• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


users/arnez/lk
RSS
Rev. Tiempo Autor
95368b1 users/arnez/lk 2017-02-08 00:25:55 Philipp Rudo

Add S390 support for linux-kernel target

After implementing the new linux-kernel target and preparing s390-tdep.
It is now time to get everything to work. Thus implement the hooks
required by the linux-kernel target and enable s390's privileged
registers.

gdb/ChangeLog:

* s390-lk-tdep.h: New file.
* s390-lk-tdep.c: New file.
* Makefile.in (ALL_TARGET_OBS): Add s390-lk-tdep.o.
(ALLDEPFILES): Add s390-lk-tdep.c.
* s390-tdep.h: Define macros for address translation.
* s390-tdep.c (s390-lk-tdep.h): New include.
(s390_iterate_over_regset_sections): Enable privileged registers.
(s390_core_read_description): Enable privileged registers.
(s390_gdbarch_init): : Enable privileged registers and adjust.

654305d 2017-02-08 00:25:55 Philipp Rudo

Add privileged registers for s390x

The Linux kernel and thus the linux-kernel target needs access to S390x's
privileged registers. Define new features and prepare s390-tdep.* to use
them in new Linux kernel code.

gdb/ChangeLog:

* features/s390-cr.xml: New file.
* features/s390x-cr-linux64.xml: New file
* features/s390x-vxcr-linux64.xml: New file
* features/Makefile: Add s390x-cr-linux64-expedite and
s390x-vxcr-linux64-expedite
(WICH): Add s390x-cr-linux64.xml and s390x-vxcr-linux64.xml
(XMLTOC): Add s390x-cr-linux64.xml and s390x-vxcr-linux64.xml
* features/s390x-cr-linux64.c: Generated.
* features/s390x-vxcr-linux64.c: Generated.
* regformats/s390x-cr-linux64.dat: Generated.
* regformats/s390x-vxcr-linux64.dat: Generated.
* s390-tdep.h: Define regnums for control registers.
(S390_NUM_REGS): Adjust.
* s390-tdep.c: (s390_dwarf_regmat): Add control registers.

368915f 2017-02-08 00:25:54 Philipp Rudo

Seperate common s390-tdep.* from s390-linux-tdep.*

The new linux-kernel target need some architecture dependant code. To
prepare for this split up the existing s390 code into a general s390-tedep
and a GDNU/Linux (user space) specific s390-linux-tdep. This keeps the
files manageable and allows for kernel specific code e.g. unwinder.

gdb/ChangeLog:

* s390-tdep.h: New file.
* s390-tdep.c: New file.
* s390-linux-tdep.h: Move defines for hardware capabilities and
register informations to s390-tdep.h.
(s390_gdbarch_linux_init): New export.
(s390_upper_registers): New export.
* s390-linux-tdep.c: Remove unneeded includes and sort alphabetically.
(s390-tdep.h): New include.
(s390_upper_regset): Remove static.
(s390_gdbarch_init): Rename to...
(s390_gdbarch_linux_init): ...this and adjust.
(_initialize_s390_tdep): Rename to...
(_initialize_s390_linux_tdep): ...this and adjust.
(s390_abi_kind, s390_vector_abi_kind): Move to s390-tdep.h
(gdbarch_tdep, enum named opcodes): Move to s390-tdep.h
(s390_readinstruction, is_ri, is_ril): Move to s390-tdep.c
(is_rr, is_rre, is_rs, is_rsy, is_rsi, is_rie): Move to s390-tdep.c
(is_rx, is_rxy, s390_break_insn): Move to s390-tdep.c
(s390_breakpoint, s390_is_partial_instruction): Move to s390-tdep.c
(s390_software_single_step, s390_prologue_data): Move to s390-tdep.c
(s390_addr, s390_store, s390_load): Move to s390-tdep.c
(s390_check_for_saved, s390_analyze_prologue): Move to s390-tdep.c
(s390_skip_prologue, s390_register_call_saved): Move to s390-tdep.c
(s390_register_name, s390_cannot_store_register): Move to s390-tdep.c
(s390_write_pc, s390_dwarf_regmap): Move to s390-tdep.c
(s390_dwarf_reg_to_regnum, regnum_is_gpr_full): Move to s390-tdep.c
(regnum_is_vxr_full, s390_value_from_register): Move to s390-tdep.c
(s390_core_read_description): Move to s390-tdep.c
(s390_iterate_over_regset_sections): Move to s390-tdep.c
(s390_pseudo_register_name): Move to s390-tdep.c
(s390_pseudo_register_read): Move to s390-tdep.c
(s390_pseudo_register_write): Move to s390-tdep.c
(s390_pseudo_register_type): Move to s390-tdep.c
(s390_pseudo_register_reggroup_p): Move to s390-tdep.c
(s390_ax_pseudo_register_collect): Move to s390-tdep.c
(s390_ax_pseudo_register_push_stack): Move to s390-tdep.c
(s390_gen_return_address): Move to s390-tdep.c
(s390_unwind_pseudo_register): Move to s390-tdep.c
(s390_effective_inner_type): Move to s390-tdep.c
(s390_function_arg_float): Move to s390-tdep.c
(s390_function_arg_vector, is_power_of_two): Move to s390-tdep.c
(s390_function_arg_integer, s390_arg_state): Move to s390-tdep.c
(s390_handle_arg, s390_push_dummy_call): Move to s390-tdep.c
(s390_dummy_id, s390_register_return_value): Move to s390-tdep.c
(s390_return_value, s390_stack_frame_destroyed_p): Move to s390-tdep.c
(s390_dwarf2_prev_register): Move to s390-tdep.c
(s390_dwarf2_frame_init_reg): Move to s390-tdep.c
(s390_adjust_frame_regnum, s390_unwind_cache): Move to s390-tdep.c
(s390_prologue_frame_unwind_cache): Move to s390-tdep.c
(s390_stub_unwind_cache): Move to s390-tdep.c
(s390_stub_frame_unwind_cache): Move to s390-tdep.c
(s390_stub_frame_this_id): Move to s390-tdep.c
(s390_trad_frame_prev_register): Move to s390-tdep.c
(s390_stub_frame_prev_register): Move to s390-tdep.c
(s390_stub_frame_sniffer, s390_stub_frame_unwind): Move to s390-tdep.c
(s390_sigtramp_unwind_cache): Move to s390-tdep.c
(s390_sigtramp_frame_unwind_cache): Move to s390-tdep.c
(s390_sigtramp_frame_this_id): Move to s390-tdep.c
(s390_sigtramp_frame_prev_register): Move to s390-tdep.c
(s390_sigtramp_frame_sniffer): Move to s390-tdep.c
(s390_sigtramp_frame_unwind): Move to s390-tdep.c
(s390_backchain_frame_unwind_cache): Move to s390-tdep.c
(s390_frame_unwind_cache, s390_frame_this_id): Move to s390-tdep.c
(s390_frame_prev_register, s390_frame_unwind): Move to s390-tdep.c
(s390_frame_base_address): Move to s390-tdep.c
(s390_local_base_address, s390_frame_base): Move to s390-tdep.c
(s390_unwind_pc, s390_unwind_sp): Move to s390-tdep.c
(is_non_branch_ril): Move to s390-tdep.c
(s390_displaced_step_copy_insn): Move to s390-tdep.c
(s390_displaced_step_fixup): Move to s390-tdep.c
(s390_displaced_step_hw_singlestep): Move to s390-tdep.c
(s390_addr_bits_remove): Move to s390-tdep.c
(s390_address_class_type_flags): Move to s390-tdep.c
(s390_address_class_type_flags_to_name): Move to s390-tdep.c
(s390_address_class_name_to_type_flags): Move to s390-tdep.c

44098f3 2017-02-08 00:25:54 Philipp Rudo

Add commands for linux-kernel target

This patch implements a "lsmod", "struct" and, "offset" command to work with
the new linux-kernel target. The commands are a handy byproduct from
development and crude hacks. I don't expect them to be accepted in the
current state. Nevertheless there needs to be an discussion on how and
where (see gdb/python scrips in kernel sources) to implement them. So here
is the start for it.

gdb/Changelog:

* lk-cmds.h: New file.
* lk-cmds.c: New file.
* lk-low.c: Include lk-cmds.h.
(lk_try_push_target): Init commands.
* typeprint.c: Remove unnecessary forward declarations.
(whatis_exp): Remove static.
* typeprint.h (whatis_exp): New export.
* Makefile.in (SFILES, ALLDEPFILES): Add lk-cmds.c.
(HFILES_NO_SRCDIR): Add lk-cmds.h.
(COMMON_OBS): Add lk-cmds.o.

fc83f37 2017-02-08 00:25:54 Philipp Rudo

Add kernel module support for linux-kernel target

This patch implements module support for the new linux-kernel target by
adding a target_so_ops. In addition this patch adds handling for kernel
virtual addresses. This is necessary because kernel modules, unlike
task_structs, live in kernel virtual address space. Thus addresses need
to be translated before they can be read from. We achieve this by adding
an implementation for the targets to_xfer_partial hook, which translates
the addresses before passing them down to the target beneath.

gdb/ChangeLog:

* lk-modules.h: New file.
* lk-modules.c: New file.
* lk-low.h (lk_hook_is_kvaddr, lk_hook_vtop)
(lk_hook_get_module_text_offset): New arch dependent hooks.
(sturct lk_private_hooks): Add new hooks.
(LK_MODULES_NAME_LEN, LK_UTS_NAME_LEN): New define.
* lk-low.c (lk-modules.h): New include.
(lk_kvtop, restore_current_target, lk_xfer_partial): New functions.
(lk_init_private_data): Declare needed debug symbols.
(lk_try_push_target): Assert for new hooks and set solib_ops.
(init_linux_kernel_ops): Add implementation for to_xfer_partial.
* solib.c (get_solib_search_path): New function.
* solib.h (get_solib_search_path): New export.
* Makefile.in (SFILES, ALLDEPFILES): Add lk-modules.c.
(HFILES_NO_SRCDIR): Add lk-modules.h.
(COMMON_OBS): Add lk-modules.o.

7571860 2017-02-08 00:25:54 Philipp Rudo

Add basic Linux kernel support

This patch implements a basic target_ops for Linux kernel support. In
particular it models Linux tasks as GDB threads such that you are able to
change to a given thread, get backtraces, disassemble the current frame
etc..

Currently the target_ops is designed only to work with static targets, i.e.
dumps. Thus it lacks implementation for hooks like to_wait, to_resume or
to_store_registers. Furthermore the mapping between a CPU and the
task_struct of the running task is only be done once at initialization. See
cover letter for a detailed discussion.

Nevertheless i made some design decisions different to Peter [1] which are
worth discussing. Especially storing the private data in a htab (or
std::unordered_map if i had the time...) instead of global variables makes
the code much nicer and less memory consuming.

[1] https://sourceware.org/ml/gdb-patches/2016-12/msg00382.html

gdb/ChangeLog:

* gdbarch.sh (lk_init_private): New hook.
* gdbarch.h: Regenerated.
* gdbarch.c: Regenerated.
* lk-low.h: New file.
* lk-low.c: New file.
* lk-lists.h: New file.
* lk-lists.c: New file.
* Makefile.in (SFILES, ALLDEPFILES): Add lk-low.c and lk-lists.c.
(HFILES_NO_SRCDIR): Add lk-low.h and lk-lists.h.
(ALL_TARGET_OBS): Add lk-low.o
(COMMON_OBS): Add lk-lists.o

75d79af 2017-02-08 00:25:53 Philipp Rudo

Add libiberty/concat styled concat_path function

This commit adds concat_path function to concatenate an arbitrary number of
path elements. The function automatically adds an directory separator between
two elements as needed.

gdb/ChangeLog:

* common/common-utils.h (endswith): New function.
* utils.c (_concat_path, approx_path_length): New function.
* utils.h (_concat_path): New export.
(concat_path): New define.

c48c4ca 2017-02-08 00:25:53 Philipp Rudo

Convert substitute_path_component to C++

Simplify the code of utils.c:substiute_path_component by converting it to C++.

gdb/ChangeLog:

* utils.c (substitute_path_component): Convert to C++.
* utils.h (substitute_path_componetn): Adjust declatation.
* auto-load.c (auto_load_expand_dir_vars): Adjust.

3d044c0 2017-02-07 23:05:59 Sheldon Lobo

bfd: Fix objdump --dynamic-reloc for SPARC 64-bit to show symbol names.

Fixes ld/testsuite/ld-elf/shared.exp "Build libpr16496b.so".

The root cause is in bfd/elf64-sparc.c, elf64_sparc_slurp_one_reloc_table(),
bfd_get_symcount() was used for dynamic mode as well. The fix is to use
bfd_get_dynamic_symcount().

This has been tested with sparc64-linux-gnu, and it does not introduce any
regressions.

bfd/ChangeLog:

2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>

Fix sparc64 dynamic relocation processing to use the dynamic
symbol count.
* elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
should be used.

8a78ba5 2017-02-07 09:00:25 GDB Administrator

Automatic date update in version.in

65f90e8 2017-02-07 00:25:18 Jiong Wang

[ld, testsuite] Don't print to stdout for "readelf -w" to avoid buffer overflow

ld/
* testsuite/ld-elf/compress.exp: Don't print to stdout for all
"readelf -w".

6ec7c1a 2017-02-06 19:26:13 Claudiu Zissulescu

[ARC] Provide an interface to decode ARC instructions.

gas/
2017-02-06 Claudiu Zissulescu <claziss@synopsys.com>

* config/tc-arc.c (parse_opcode_flags): Ignore implicit flags.

include/
2017-02-06 Claudiu Zissulescu <claziss@synopsys.com>
Anton Kolesov <anton.kolesov@synopsys.com>

* opcode/arc.h (insn_class_t): Add ENTER, LEAVE, POP, PUSH, BBIT0,
BBIT1, BI, BIH, BRCC, EI, JLI, and SUB instruction classes.
(flag_class_t): Add F_CLASS_WB, F_CLASS_ZZ, and F_CLASS_IMPLICIT
flag classes.

opcode/
2017-02-06 Claudiu Zissulescu <claziss@synopsys.com>
Anton Kolesov <anton.kolesov@synopsys.com>

* arc-dis.c (arc_disassemble_info): New structure.
(init_arc_disasm_info): New function.
(find_format_from_table): Ignore implicit flags.
(find_format): Update dissassembler private data.
(print_flags): Likewise.
(print_insn_arc): Likewise.
(arc_opcode_to_insn_type): Consider the new added instruction
classes.
(arcAnalyzeInstr): Remove.
(arc_insn_decode): New function.
* arc-dis.h (arc_ldst_writeback_mode): New enum.
(arc_ldst_data_size): Likewise.
(arc_condition_code): Likewise.
(arc_operand_kind): Likewise.
(arc_insn_kind): New struct.
(arc_instruction): Likewise.
(arc_insn_decode): Declare function.
(ARC_Debugger_OperandType): Deleted.
(Flow): Likewise.
(NullifyMode): Likewise.
(allOperandsSize): Likewise.
(arcDisState): Likewise.
(arcAnalyzeInstr): Likewise.
* arc-dis.c (arc_opcode_to_insn_type): Handle newly introduced
insn_class_t enums.
* arc-opc.c (F_SIZED): New define.
(C_CC_EQ, C_CC_GE, C_CC_GT, C_CC_HI, C_CC_HS): Likewise.
(C_CC_LE, C_CC_LO, C_CC_LS, C_CC_LT, C_CC_NE): Likewise.
(C_CC_NE, C_AA_AB, C_AA_AW, C_ZZ_D, C_ZZ_H, C_ZZ_B): Likewise.
(arc_flag_classes): Add F_CLASS_COND/F_CLASS_IMPLICIT flags.
* opcodes/arc-tbl.h: Update instructions to include new
F_CLASS_IMPLICIT flags.
(bbit0, lp): Change class.
(bbit1, bi, bih, br*, ei_s, jli_s): Likewsie

20b477a 2017-02-06 18:12:00 Luis Machado

[BZ 21005] Add support for Intel 64 rdrand and rdseed record/replay

This patch addresses BZ 21005, which is gdb failing to recognize an rdrand
instruction.

It enables support for both rdrand and rdseed and handles extended register
addressing (R8~R15) for 16-bit, 32-bit and 64-bit.

gdb/ChangeLog
2017-02-06 Luis Machado <lgustavo@codesourcery.com>

* NEWS: Mention support for record/replay of Intel 64 rdrand and
rdseed instructions.
i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.

gdb/testsuite/ChangeLog:
2017-02-06 Luis Machado <lgustavo@codesourcery.com>

* gdb.reverse/insn-reverse.c: Include insn-reverse-x86.c.
* gdb.reverse/insn-reverse-x86.c: New file.

3f7b46f 2017-02-06 16:44:03 Ivo Raisr

gdb: provide and use sparc{32,64} target description XML files.

gdb/ChangeLog:

2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>

PR tdep/20936
Provide and use sparc32 and sparc64 target description XML files.
* features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
* features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
* features/sparc/sparc32-solaris.xml: New file.
* features/sparc/sparc64-solaris.xml: New file.
* features/sparc/sparc32-solaris.c: Generated.
* features/sparc/sparc64-solaris.c: Generated.
* sparc-tdep.h: Account for differences in target descriptions.
* sparc-tdep.c (sparc32_register_name): Use target provided registers.
(sparc32_register_type): Use target provided registers.
(validate_tdesc_registers): New function.
(sparc32_gdbarch_init): Use tdesc_has_registers.
Set pseudoregister functions.
* sparc64-tdep.c (sparc64_register_name): Use target provided registers.
(sparc64_register_type): Use target provided registers.
(sparc64_init_abi): Set pseudoregister functions.

gdb/doc/ChangeLog:

2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>

PR tdep/20936
* gdb.texinfo: (Standard Target Features): Document SPARC features.
(Sparc Features): New node.

gdb/testsuite/ChangeLog:

2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>

PR tdep/20936
* gdb.xml/tdesc-regs.exp: Provide sparc core registers for the tests.

de32a80 2017-02-06 09:00:21 GDB Administrator

Automatic date update in version.in

5d3debc 2017-02-05 09:00:20 GDB Administrator

Automatic date update in version.in

f0fd41c 2017-02-04 14:14:36 Tom Tromey

Fix ptype of single-member Rust enums

While looking into PR rust/21097, I found that ptype of a
single-element enum in Rust did not always format the result properly.
In particular, it would leave out the members of a tuple struct.
Further testing showed that it also did the wrong thing for ordinary
struct members as well.

This patch fixes these problems. I'm marking it as being associated
with the PR, since that is where the discovery was made; but this
doesn't actually fix that PR (which I think ultimately is due to a
Rust compiler bug).

Built and regtested on x86-64 Fedora 25, using the system Rust
compiler. I'm checking this in.

2017-02-03 Tom Tromey <tom@tromey.com>

PR rust/21097:
* rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
with a single member.

2017-02-03 Tom Tromey <tom@tromey.com>

PR rust/21097:
* gdb.rust/simple.exp: Add new tests.

e25dae2 2017-02-04 09:00:20 GDB Administrator

Automatic date update in version.in

d6f9b0f 2017-02-04 01:30:04 Pedro Alves

C++-fy struct interp/cli_interp/tui_interp/mi_interp

- The interp->data field disappears, since we can put data in the
interpreter directly now. The "init" method remains in place, but
it now returns void.

- A few places check if the interpreter method is NULL before calling
it, and also check whether the method returns true/false. For some
of those methods, all current implementations always return true.
In those cases, this commit makes the C++-fied method return void
instead and cleans up the callers.

Tested on x86_64 Fedora 23.

gdb/ChangeLog:
2017-02-03 Pedro Alves <palves@redhat.com>

* cli/cli-interp.c (cli_interp_base::cli_interp_base)
(cli_interp_base::~cli_interp_base): New.
(cli_interp): New struct.
(as_cli_interp): Cast the interp itself to cli_interp.
(cli_interpreter_pre_command_loop): Rename to ...
(cli_interp_base::pre_command_loop): ... this. Remove 'self'
parameter.
(cli_interpreter_init): Rename to ...
(cli_interp::init): ... this. Remove 'self' parameter. Use
boolean. Make extern.
(cli_interpreter_resume): Rename to ...
(cli_interp::resume): ... this. Remove 'data' parameter. Make
extern.
(cli_interpreter_suspend): Rename to ...
(cli_interp::suspend): ... this. Remove 'data' parameter. Make
extern.
(cli_interpreter_exec): Rename to ...
(cli_interp::exec): ... this. Remove 'data' parameter. Make
extern.
(cli_interpreter_supports_command_editing): Rename to ...
(cli_interp_base::supports_command_editing): ... this. Remove
'interp' parameter. Make extern.
(cli_ui_out): Rename to ...
(cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
Make extern.
(cli_set_logging): Rename to ...
(cli_interp_base::set_logging): ... this. Remove 'interp'
parameter. Make extern.
(cli_interp_procs): Delete.
(cli_interp_factory): Adjust to use "new".
* cli/cli-interp.h: Include "interps.h".
(struct cli_interp_base): New struct.
* interps.c (struct interp): Delete. Fields moved to interps.h.
(interp_new): Delete.
(interp::interp, interp::~interp): New.
(interp_set): Use bool, and return void. Assume the interpreter
has suspend, init and resume methods, and that the all return
void.
(set_top_level_interpreter): interp_set returns void.
(interp_ui_out): Adapt.
(current_interp_set_logging): Adapt.
(interp_data): Delete.
(interp_pre_command_loop, interp_supports_command_editing): Adapt.
(interp_exec): Adapt.
(top_level_interpreter_data): Delete.
* interps.h (interp_init_ftype, interp_resume_ftype)
(interp_suspend_ftype, interp_exec_ftype)
(interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
(class interp): New.
(interp_new): Delete.
(interp_set): Now returns void. Use bool.
(interp_data, top_level_interpreter_data): Delete.
* mi/mi-common.h: Include interps.h.
(class mi_interp): Inherit from interp. Define a ctor. Declare
init, resume, suspect, exec, interp_ui_out, set_logging and
pre_command_loop methods.
* mi/mi-interp.c (as_mi_interp): Cast the interp itself.
(mi_interpreter_init): Rename to ...
(mi_interp::init): ... this. Remove the 'interp' parameter, use
bool, return void and make extern. Adjust.
(mi_interpreter_resume): ... Rename to ...
(mi_interp::resume): ... this. Remove the 'data' parameter,
return void and make extern. Adjust.
(mi_interpreter_suspend): ... Rename to ...
(mi_interp::suspend): ... this. Remove the 'data' parameter,
return void and make extern. Adjust.
(mi_interpreter_exec): ... Rename to ...
(mi_interp::exec): ... this. Remove the 'data' parameter and make
extern. Adjust.
(mi_interpreter_pre_command_loop): ... Rename to ...
(mi_interp::pre_command_loop): ... this. Remove the 'self'
parameter and make extern.
(mi_on_normal_stop_1): Adjust.
(mi_ui_out): Rename to ...
(mi_interp::interp_ui_out): ... this. Remove the 'interp'
parameter and make extern. Adjust.
(mi_set_logging): Rename to ...
(mi_interp::set_logging): ... this. Remove the 'interp'
parameter and make extern. Adjust.
(mi_interp_procs): Delete.
(mi_interp_factory): Adjust to use 'new'.
* mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
(mi_print_exception, mi_execute_command, mi_load_progress):
Adjust.
* tui/tui-interp.c (tui_interp): New class.
(as_tui_interp): Return a tui_interp pointer.
(tui_on_normal_stop, tui_on_signal_received)
(tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
(tui_on_no_history, tui_on_user_selected_context_changed): Adjust
to use interp::interp_ui_out.
(tui_init): Rename to ...
(tui_interp::init): ... this. Remove the 'self' parameter, use
bool, return void and make extern. Adjust.
(tui_resume): Rename to ...
(tui_interp::resume): ... this. Remove the 'data' parameter,
return void and make extern. Adjust.
(tui_suspend): Rename to ...
(tui_interp::suspend): ... this. Remove the 'data' parameter,
return void and make extern. Adjust.
(tui_ui_out): Rename to ...
(tui_interp::interp_ui_out): ... this. Remove the 'self'
parameter, and make extern. Adjust.
(tui_exec): Rename to ...
(tui_interp::exec): ... this. Remove the 'data' parameter and
make extern.
(tui_interp_procs): Delete.
(tui_interp_factory): Use "new".

e666304 2017-02-03 18:36:53 Alan Modra

[GOLD] PowerPC64 TOC indirect to TOC relative segfault

* powerpc.cc (Powerpc_relobj::make_toc_relative): Don't crash
when no .toc section exists.

1b7e3d2 2017-02-03 18:04:21 Nick Clifton

Fix compile time warning messages when compiling binutils with gcc 7.0.1.

PR 21096
bfd * coffcode.h (coff_write_object_contents): Enlarge size of
s_name_buf in order to avoid compile time warning about possible
integer truncation.
* elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
32-bits of insn value before printing into buffer.

opcodes * aarch64-opc.c (print_register_list): Ensure that the register
list index will fir into the tb buffer.
(print_register_offset_address): Likewise.
* tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf.

65c40c9 2017-02-03 13:25:12 Tom Tromey

Use bool in Rust code

This changes various functions in the Rust code to use a bool rather
than an int when a boolean is intended.

2017-02-02 Tom Tromey <tom@tromey.com>

* rust-exp.y (ends_raw_string, space_then_number)
(rust_identifier_start_p): Return bool.
* rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
(rust_tuple_struct_type_p, rust_tuple_variant_type_p)
(rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
(rust_chartype_p): Return bool.
(val_print_struct, rust_print_struct_def, rust_print_type):
Update.
* rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
Return bool.

b50f188 2017-02-03 13:25:11 Tom Tromey

Reindent rust-lang.c

I noticed a few spots in rust-lang.c had incorrect indentation. This
patch fixes this.

2017-02-02 Tom Tromey <tom@tromey.com>

* rust-lang.c: Reindent.

03c85b1 2017-02-03 13:25:11 Tom Tromey

Use std::string in Rust code

This changes a couple of spots in the Rust support to use std::string.
In one spot this removes some manual memory management; in the other
spot this allows the removal of a call to xstrdup.

2017-02-02 Tom Tromey <tom@tromey.com>

* rust-lang.h (rust_crate_for_block): Update.
* rust-lang.c (rust_crate_for_block): Return std::string.
(rust_get_disr_info): Use std:;string, not
gdb::unique_xmalloc_ptr.
* rust-exp.y (crate_name): Update.

73dceb9 2017-02-03 09:00:23 GDB Administrator

Automatic date update in version.in

9b6da50 2017-02-03 08:36:29 Pedro Alves

Fix "maintenance selftest" printing stray instructions

The "maintenance selftest" command is printing odd bits of stray
instructions like:

~~~
brkwarning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default HS settings.


brkmov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0breakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakM3.L = 0xffff;/* ( -1) M3=0x0xffff(65535) */break 8break 8warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default cris:common_v10_v32 settings.
~~~

etc. Those appear because here:

class gdb_disassembler_test : public gdb_disassembler
{
public:

const bool verbose = false;

explicit gdb_disassembler_test (struct gdbarch *gdbarch,
const gdb_byte *insn,
size_t len)
: gdb_disassembler (gdbarch,
(verbose ? gdb_stdout : &null_stream),
gdb_disassembler_test::read_memory),


specifically in this line:

(verbose ? gdb_stdout : &null_stream),

"verbose" has not been initialized yet, because the order of
initialization is base classes first, then members. I.e. "verbose" is
only initialized after the base constructor is called. Since the
gdb_disassembler_test object is created on the stack, "verbose" has
garbage at that point. If the gargage is non-zero, then we end up
with the gdb_disassembler_test's stream incorrectly pointing to
gdb_stdout.

gdb/ChangeLog:
2017-02-02 Pedro Alves <palves@redhat.com>

* disasm-selftests.c (print_one_insn_test): Move the "verbose"
field out of gdb_disassembler_test and make it static.

b1ace6b 2017-02-03 08:27:57 Pedro Alves

Fix "maintenance selftest" printing stray instructions

The "maintenance selftest" command is printing odd bits of stray
instructions like:

~~~
brkwarning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default HS settings.


brkmov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0mov r0, #0breakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakbreakM3.L = 0xffff;/* ( -1) M3=0x0xffff(65535) */break 8break 8warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default cris:common_v10_v32 settings.
~~~

etc. Those appear because here:

class gdb_disassembler_test : public gdb_disassembler
{
public:

const bool verbose = false;

explicit gdb_disassembler_test (struct gdbarch *gdbarch,
const gdb_byte *insn,
size_t len)
: gdb_disassembler (gdbarch,
(verbose ? gdb_stdout : &null_stream),
gdb_disassembler_test::read_memory),


specifically in this line:

(verbose ? gdb_stdout : &null_stream),

"verbose" has not been initialized yet, because the order of
initialization is base classes first, then members. I.e. "verbose" is
only initialized after the base constructor is called. Since the
gdb_disassembler_test object is created on the stack, "verbose" has
garbage at that point. If the gargage is non-zero, then we end up
with the gdb_disassembler_test's stream incorrectly pointing to
gdb_stdout.

gdb/ChangeLog:
2017-02-02 Pedro Alves <palves@redhat.com>

* disasm-selftests.c (print_one_insn_test): Move the "verbose"
field out of gdb_disassembler_test and make it static.

ec4cb20 2017-02-03 08:08:12 Pedro Alves

struct mi_interp: Remove unused fields

gdb/ChangeLog:
2017-02-02 Pedro Alves <palves@redhat.com>

* mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
mi1_interp and mi_interp fields.

e17b0c3 2017-02-03 07:38:23 Maciej W. Rozycki

MIPS/BFD: Respect the ELF gABI dynamic symbol table sort requirement

Ensure all local symbols precede external symbols in the dynamic symbol
table.

No local symbols are expected to make it to the dynamic symbol table
except for section symbols already taken care of, so this is really a
safeguard only against a potential BFD bug otherwise not so harmful,
which may become a grave one due to a symbol table sorting requirement
violation (see PR ld/20828 for an example). This means however that no
test suite coverage is possible for this change as code introduced here
is not normally expected to trigger.

Logically split then the part of the dynamic symbol table which is not
global offset table mapped, into a local area at the beginning and an
external area following. By the time `mips_elf_sort_hash_table' is
called we have the number of local dynamic symbol table entries (section
and non-section) already counted in `local_dynsymcount', so use it to
offset the external area from the beginning.

bfd/
* elfxx-mips.c (mips_elf_hash_sort_data): Add
`max_local_dynindx'.
(mips_elf_sort_hash_table): Handle it.
(mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
symbols bump up `max_local_dynindx' rather than
`max_non_got_dynindx'.

55f8b9d 2017-02-03 07:37:16 Maciej W. Rozycki

MIPS/BFD: Use `bfd_size_type' for dynamic symbol table indices

Use the `bfd_size_type' data type for dynamic symbol table indices in
the MIPS backend, in line with generic code and removing the need to use
a cast.

bfd/
* elfxx-mips.c (mips_elf_hash_sort_data): Convert the
`min_got_dynindx', `max_unref_got_dynindx' and
`max_non_got_dynindx' members to the `bfd_size_type' data type.
(mips_elf_sort_hash_table): Adjust accordingly.