Alan Modra [Thu, 25 Jul 2013 15:18:26 +0000 (15:18 +0000)]
* elf64-ppc.c (struct ppc64_elf_obj_tdata): Replace opd_relocs
with a union.
(opd_entry_value): Cache .opd section contents.
(ppc64_elf_relocate_section): Adjust.
Tom Tromey [Thu, 25 Jul 2013 14:34:51 +0000 (14:34 +0000)]
remove pop_target
This patch fixes the target double-close problem (PR remote/15266),
and in the process removes pop_target entire (PR remote/15256).
The first issue is that pop_target calls target_close. However, it
then calls unpush_target, which also calls target_close. This means
targets must be able to be closed twice. Not only is this strange,
but it also directly contradicts the contract of to_xclose targets.
(We currently have just a single such target, and it is never pushed;
but I plan to add more, and so this latent bug is triggered.)
The second issue is that it seems to me that calling pop_target is
often unsafe. This is what cropped up in 15256, where the remote
target assumed that it could pop_target -- but there was another
target higher on the stack, leading to confusion.
But, it is always just as easy to call unpush_target as it is to call
pop_target; and it is also safer. So, removing pop_target seemed like
an improvement.
Finally, this adds an assertion to target_close to ensure that no
currently-pushed target can be closed.
Built and regtested on x86-64 Fedora 18; both natively and using the
native-gdbserver board file.
PR remote/15256, PR remote/15266:
* bfd-target.c (target_bfd_reopen): Initialize to_magic.
* monitor.c (monitor_detach): Use unpush_target.
* remote-m32r-sdi.c (m32r_detach): Use unpush_target.
* remote-mips.c (mips_detach): Use unpush_target. Don't
call mips_close.
* remote-sim.c (gdbsim_detach): Use unpush_target.
* target.c (pop_target): Remove.
(pop_all_targets_above): Don't call target_close.
(target_close): Assert that the target is unpushed.
* target.h (pop_target): Don't declare.
* tracepoint.c (tfile_open): Use unpush_target.
Tom Tromey [Thu, 25 Jul 2013 14:28:15 +0000 (14:28 +0000)]
don't call add_target for thread_db_ops
Right now, "help target" will include this line:
target multi-thread -- Threads and pthreads support
However, it doesn't make sense to invoke "target multi-thread".
This patch fixes the problem by not registering the multi-thread
target. add_target does some needed initialization of the target_ops,
so I broke this out into a new function.
It isn't clear to me whether this patch requires a test case or not.
I'm not sure whether there are other unregistered targets; but if
there are, it seems unlikely that we test for their absence from the
help.
Built and regtested on x86-64 Fedora 18.
* linux-thread-db.c (init_thread_db_ops): Call
complete_target_initialization.
(_initialize_thread_db): Don't call add_target.
* target.c (complete_target_initialization): New function.
(add_target_with_completer): Call it.
* target.h (complete_target_initialization): Declare.
Mark Kettenis [Thu, 25 Jul 2013 12:10:44 +0000 (12:10 +0000)]
2013-07-25 Mark Kettenis <kettenis@gnu.org>
* hppa-tdep.h (enum hppa_regnum): Add members for all space registers.
* hppaobsd-tdep.c (HPPAOBSD_SIZEOF_GREGS): Add comment.
(HPPANBSD_SIZEOF_GREGS): New define.
(hppaobsd_supply_gregset): Handle additional registers.
* hppabsd-nat.c (hppabsd_gregset_supplies_p): Adjust to indicate
we provide more registers now.
(hppabsd_supply_gregset): Supply additional registers.
(hppabsd_collect_gregset): Collect additional registers.
Mark Kettenis [Thu, 25 Jul 2013 12:05:01 +0000 (12:05 +0000)]
2013-07-25 Mark Kettenis <kettenis@gnu.org>
* hppabsd-tdep.c: Include "dwarf2-frame.h".
(hppabsd_dwarf2_frame_init_reg): New function.
(hppabsd_init_abi): Hook in the DWARF CFI frame unwinder.
Andrew Burgess [Thu, 25 Jul 2013 10:39:39 +0000 (10:39 +0000)]
Resue 'z' formatter from mi register display code.
http://sourceware.org/ml/gdb-patches/2013-07/msg00236.html
gdb/ChangeLog
* mi/mi-main.c (output_register): Make MI 'r' format use standard
'z' format code. Remove error for optimized out values, standard
code will handle these fine.
gdb/testsuite/ChangeLog
* gdb.mi/mi-reg-undefined.exp: New file.
* gdb.mi/mi-reg-undefined.c: Likewise.
* gdb.mi/mi-reg-undefined.S: Likewise.
Andrew Burgess [Thu, 25 Jul 2013 10:16:08 +0000 (10:16 +0000)]
Add new 'z' format for print command.
http://sourceware.org/ml/gdb-patches/2013-07/msg00235.html
gdb/ChangeLog
* NEWS: Mention new 'z' formatter.
* printcmd.c (print_scalar_formatted): Add new 'z' formatter.
(_initialize_printcmd): Mention 'z' formatter in help text of the
'x' command.
gdb/doc/ChangeLog
* gdb.texinfo (Output Formats): Mention the new 'z' formatter.
gdb/testsuite/ChangeLog
* gdb.base/printcmds.exp (test_print_int_arrays): Add tests for x,
z, o, and t output formats.
* gdb.base/display.exp: Use 'k' as an undefined format now that
'z' is defined.
Alan Modra [Thu, 25 Jul 2013 00:14:11 +0000 (00:14 +0000)]
PR ld/15762
PR ld/12761
* elflink.c (elf_link_add_object_symbols): Correct test in
last patch. Remove unnecessary code.
Alan Modra [Thu, 25 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Maciej W. Rozycki [Wed, 24 Jul 2013 22:23:12 +0000 (22:23 +0000)]
* mips-tdep.c (micromips_deal_with_atomic_sequence): Correct
formatting.
Doug Evans [Wed, 24 Jul 2013 21:59:30 +0000 (21:59 +0000)]
* boards/native-stdio-gdbserver.exp (${board}_build_remote_cmd): Pass
"--" to switch.
Sergio Durigan Junior [Wed, 24 Jul 2013 19:50:32 +0000 (19:50 +0000)]
2013-07-24 Sergio Durigan Junior <sergiodj@redhat.com>
* breakpoint.c (create_longjmp_master_breakpoint): Check if probe
interface can evaluate arguments. Fallback to the old mode if it
cannot.
(create_exception_master_breakpoint): Likewise.
* elfread.c (elf_can_evaluate_probe_arguments): New function.
(struct sym_probe_fns elf_probe_fns): Export function above to the
probe interface.
* probe.c (can_evaluate_probe_arguments): New function.
* probe.h (struct probe_ops) <can_evaluate_probe_arguments>: New
function pointer.
(can_evaluate_probe_arguments): New function prototype.
* solib-svr4.c (svr4_create_solib_event_breakpoints): Check if
probe interface can evaluate arguments. Fallback to the old mode
if it cannot.
* stap-probe.c (stap_get_probe_argument_count): Check if probe
interface can evaluate arguments. Warning the user if it cannot.
(stap_can_evaluate_probe_arguments): New function.
(struct probe_ops stap_probe_ops): Export function above to the
probe interface.
* symfile.h (struct sym_probe_fns) <can_evaluate_probe_arguments>:
New function pointer.
H.J. Lu [Wed, 24 Jul 2013 17:24:20 +0000 (17:24 +0000)]
Check .gnu.warning section in shared library
PR ld/15762
* ld-elf/shared.exp (build_tests): Check .gnu.warning section
in the libbarw.so library.
* ld-elf/libbarw.rd: New.
* lib/ld-lib.exp (run_cc_link_tests): Support checking on
output with warning message.
Luis Machado [Wed, 24 Jul 2013 16:20:12 +0000 (16:20 +0000)]
gdb/
* Makefile.in (SFILES): Add common/target-common.c.
Add common/target-common.h to headers.
(COMMON_OBS): Add target-common.o.
(target-common.o): New target.
* linux-nat.h (resume_kind): Move to common/target-common.h.
* target.c (target_waitstatus_to_string): Move to
common/target-common.c.
* target.h: Include target-common.h.
(target_waitkind): Move to common/target-common.h.
(target_waitstatus): Likewise.
(TARGET_WNOHANG): Likewise.
* common/target-common.c: New file.
* common/target-common.h: New file.
gdb/gdbserver/
* Makefile.in (SFILES): /common/target-common.c.
(OBS): Add target-common.o.
(server_h): Add $(srcdir)/../common/target-common.h.
(target-common.o): New target.
* server.c (queue_stop_reply_callback): Free
status string after use.
* target.c (target_waitstatus_to_string): Remove.
* target.h: Include target-common.h.
(resume_kind): Likewise.
(target_waitkind): Likewise.
(target_waitstatus): Likewise.
(TARGET_WNOHANG): Likewise.
H.J. Lu [Wed, 24 Jul 2013 15:47:25 +0000 (15:47 +0000)]
Support Intel MPX
gas/
2013-07-24 Anna Tikhonova <anna.tikhonova@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* config/tc-i386.c (BND_PREFIX): New.
(struct _i386_insn): Add new field bnd_prefix.
(add_bnd_prefix): New.
(cpu_arch): Add MPX.
(i386_operand_type): Add regbnd.
(md_assemble): Handle BND prefixes.
(parse_insn): Likewise.
(output_branch): Likewise.
(output_jump): Likewise.
(build_modrm_byte): Handle regbnd.
(OPTION_MADD_BND_PREFIX): New.
(md_longopts): Add entry for 'madd-bnd-prefix'.
(md_parse_option): Handle madd-bnd-prefix option.
(md_show_usage): Add description for madd-bnd-prefix
option.
* doc/c-i386.texi: Document mpx/.mpx and -madd-bnd-prefix.
gas/testsuite/
2013-07-24 Anna Tikhonova <anna.tikhonova@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* gas/i386/mpx-add-bnd-prefix.s: New.
* gas/i386/mpx-add-bnd-prefix.d: New.
* gas/i386/mpx-inval-1.l: New.
* gas/i386/mpx-inval-1.s: New.
* gas/i386/mpx.d: New.
* gas/i386/mpx.s: New.
* gas/i386/x86-64-mpx-add-bnd-prefix.d: New.
* gas/i386/x86-64-mpx-add-bnd-prefix.s: New.
* gas/i386/x86-64-mpx-addr32.d: New.
* gas/i386/x86-64-mpx-addr32.s: New.
* gas/i386/x86-64-mpx-inval-1.l: New.
* gas/i386/x86-64-mpx-inval-1.s: New.
* gas/i386/x86-64-mpx-inval-2.l: New.
* gas/i386/x86-64-mpx-inval-2.s: New.
* gas/i386/x86-64-mpx.d: New.
* gas/i386/x86-64-mpx.s: New.
* gas/i386/nops.d: Adjust to MPX changes.
* gas/i386/nops.s: Likewise.
* gas/i386/x86-64-nops.d: Likewise.
* gas/i386/x86-64-nops.s: Likewise.
* gas/i386/ilp32/x86-64-nops.d: Likewise.
* gas/i386/i386.exp: Run new MPX tests.
include/opcode/
2013-07-24 Anna Tikhonova <anna.tikhonova@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* i386.h (BND_PREFIX_OPCODE): New.
opcodes/
2013-07-24 Anna Tikhonova <anna.tikhonova@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* i386-dis.c (BND_Fixup): New.
(Ebnd): New.
(Ev_bnd): New.
(Gbnd): New.
(BND): New.
(v_bnd_mode): New.
(bnd_mode): New.
(MOD enum): Add new entries.
(PREFIX enum): Likewise.
(dis tables): Replace XX with BND for near branch and call
instructions.
(prefix_table): Add new entries.
(mod_table): Likewise.
(names_bnd): New.
(intel_names_bnd): New.
(att_names_bnd): New.
(BND_PREFIX): New.
(prefix_name): Handle BND_PREFIX.
(print_insn): Initialize names_bnd.
(intel_operand_size): Handle new modes.
(OP_E_register): Likewise.
(OP_E_memory): Likewise.
(OP_G): Likewise.
* i386-gen.c (cpu_flag_init): Add CpuMPX.
(cpu_flags): Add CpuMPX.
(operand_type_init): Add RegBND.
(opcode_modifiers): Add BNDPrefixOk.
(operand_types): Add RegBND.
* i386-init.h: Regenerate.
* i386-opc.h (CpuMPX): New.
(CpuUnused): Comment out.
(i386_cpu_flags): Add cpumpx.
(BNDPrefixOk): New.
(i386_opcode_modifier): Add bndprefixok.
(RegBND): New.
(i386_operand_type): Add regbnd.
* i386-opc.tbl: Add BNDPrefixOk to near jumps, calls and rets.
Add MPX instructions and bnd prefix.
* i386-reg.tbl: Add bnd0-bnd3 registers.
* i386-tbl.h: Regenerate.
Doug Evans [Wed, 24 Jul 2013 15:45:32 +0000 (15:45 +0000)]
* dwarf2read.c (lookup_dwo_cutu): Change missing DWO complaint to
a warning.
Tristan Gingold [Wed, 24 Jul 2013 14:12:41 +0000 (14:12 +0000)]
bfd/
2013-07-24 Tristan Gingold <gingold@adacore.com>
* coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
R_RBR. Add numbers in comments.
(_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_PPC_B16.
* coff64-rs6000.c: Likewise.
gas/
2013-07-24 Tristan Gingold <gingold@adacore.com>
* config/tc-ppc.c (md_apply_fix): Adjust BFD_RELOC_PPC_B16 on
xcoff targets.
gas/testsuite/
2013-07-24 Tristan Gingold <gingold@adacore.com>
* gas/ppc/test2xcoff32.s, gas/ppc/test2xcoff32.d: New files
* gas/ppc/ppc.exp: Add new test.
* gas/ppc/xcoff-br16-1.s, gas/ppc/xcoff-br16-1.d,
gas/ppc/xcoff-br16-2.s, gas/ppc/xcoff-br16-2.d: New files
* gas/ppc/aix.exp: Add new tests.
Yao Qi [Wed, 24 Jul 2013 09:17:15 +0000 (09:17 +0000)]
gdb/testsuite/
* gdb.mi/mi-var-cmd.exp: If host is remote, use ${testfile} on
host.
* gdb.mi/mi-basics.exp (test_exec_and_symbol_mi_operatons):
Likewise. If host is remote, copy ${binfile} to host.
Andreas Krebbel [Wed, 24 Jul 2013 09:02:45 +0000 (09:02 +0000)]
2013-07-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/tc-s390.c (s390_machine): Don't force the .machine
argument to lower case.
Alan Modra [Wed, 24 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Nick Clifton [Tue, 23 Jul 2013 07:40:46 +0000 (07:40 +0000)]
oops - omitted from previous delta
Yao Qi [Tue, 23 Jul 2013 07:02:03 +0000 (07:02 +0000)]
gdb/
* i386-tdep.c (i386_in_stack_tramp_p): Remove unused
parameter 'gdbarch'.
(i386_stack_tramp_frame_sniffer): Caller update.
* i386-linux-tdep.c (i386_linux_core_read_xcr0): Remove
parameter 'gdbarch' and 'target'.
(i386_linux_core_read_description): Caller update.
* amd64-linux-tdep.c (amd64_linux_core_read_description):
Likewise.
* i386-linux-tdep.h (i386_linux_core_read_xcr0): Update
declaration.
Tom Tromey [Tue, 23 Jul 2013 06:56:53 +0000 (06:56 +0000)]
* dwarf2read.c (init_cutu_and_read_dies): Revert patch from
2013-07-22.
Yao Qi [Tue, 23 Jul 2013 06:54:47 +0000 (06:54 +0000)]
gdb/testsuite/
* gdb.mi/mi-var-cmd.exp: Adjust pattern to match current error
message.
Alan Modra [Tue, 23 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Jan Kratochvil [Mon, 22 Jul 2013 20:52:23 +0000 (20:52 +0000)]
Fix the following ChangeLog entry:
2013-07-22 Doug Evans <dje@google.com>
gdb/
* exec.h (remove_target_sections): Delete arg abfd.
* exec.c (exec_close): Update call to remove_target_sections.
(remove_target_sections): Delete arg abfd.
* solib.c (update_solib_list): Ditto.
(reload_shared_libraries_1): Ditto.
(clear_solib): Ditto, and unconditionally call remove_target_sections.
* target.h (struct target_section): Rename key to owner.
All uses updated.
Jan Kratochvil [Mon, 22 Jul 2013 20:51:11 +0000 (20:51 +0000)]
2013-07-22 Doug Evans <dje@google.com>
gdb/
* exec.h (remove_target_sections): Delete arg abfd.
* exec.c (remove_target_sections): Delete arg abfd.
(exec_close): Update call to remove_target_sections.
* solib.c (update_solib_list): Ditto.
(reload_shared_libraries_1): Ditto.
(clear_solib): Ditto, and unconditionally call remove_target_sections.
DJ Delorie [Mon, 22 Jul 2013 18:03:12 +0000 (18:03 +0000)]
merge from gcc
Tom Tromey [Mon, 22 Jul 2013 18:00:50 +0000 (18:00 +0000)]
fix solib-som.c
som_open_symbol_file_object was leaking a cleanup.
* solib-som.c (som_open_symbol_file_object): Call do_cleanups.
Tom Tromey [Mon, 22 Jul 2013 17:58:51 +0000 (17:58 +0000)]
fix init_cutu_and_read_dies
init_cutu_and_read_dies creates an outer cleanup and uses its
immediately nested inner cleanup conditionally. This seems overly
complicated to me; simpler is to just deal with the outer cleanup and
drop the inner one. That is what this patch implements.
* dwarf2read.c (init_cutu_and_read_dies): Remove 'free_cu_cleanup'.
Simplify cleanup handling.
Tom Tromey [Mon, 22 Jul 2013 17:53:55 +0000 (17:53 +0000)]
fix dwarf_decode_line_header
dwarf_decode_line_header has one return that is missing a call to
do_cleanups. This patch adds it.
This was found using the cleanup checker.
* dwarf2read.c (dwarf_decode_line_header): Call do_cleanups
on all return paths.
Joel Brobecker [Mon, 22 Jul 2013 15:17:20 +0000 (15:17 +0000)]
src-release: Fix VER computation for TOOL=gdb
Without this patch, the DATE marker in gdb/version.in does not get
replaced by the source packaging date, causing the name of the
tarball being created to: have the DATE marker in the tarball
name and the name of the directory the sources unpack to (Eg:
gdb-7.6.50-DATE-cvs.tar instead of gdb-7.6.50-
20130710-cvs.tar).
ChangeLog:
* src-release (VER): Use $(TOOL)/common/create-version.sh
if it exists.
Ulrich Weigand [Mon, 22 Jul 2013 13:17:51 +0000 (13:17 +0000)]
2013-07-22 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c (PPC_DEBUG_FEATURE_DATA_BP_DAWR): New define.
(ppc_linux_region_ok_for_hw_watchpoint): Add checking to use the new
DAWR interface for longer ranges hardware watchpoint (up to 512 bytes).
Nick Clifton [Mon, 22 Jul 2013 13:04:57 +0000 (13:04 +0000)]
oops - omitted fromn previous delta
Nick Clifton [Mon, 22 Jul 2013 13:03:30 +0000 (13:03 +0000)]
* ld-scripts/script.exp: Use run_dump_test instead of
ld_simple_link to check the error message.
* ld-scripts/align-with-input.d: New file.
* ld-scripts/region-alias-1.d: Likewise.
* ld-scripts/region-alias-2.d: Likewise.
* ld-scripts/region-alias-3.d: Likewise.
* ld-scripts/region-alias-4.d: Likewise.
Phil Muldoon [Mon, 22 Jul 2013 11:42:31 +0000 (11:42 +0000)]
2013-07-22 Phil Muldoon <pmuldoon@redhat.com>
* top.c (print_gdb_version): Add help, apropos description and
url to online documentation.
Kyrylo Tkachov [Mon, 22 Jul 2013 09:05:04 +0000 (09:05 +0000)]
2013-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/tc-arm.c (s_arm_arch_extension): Improve error message
for invalid extension.
Alan Modra [Mon, 22 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
DJ Delorie [Sun, 21 Jul 2013 17:19:10 +0000 (17:19 +0000)]
merge from gcc
Alan Modra [Sun, 21 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Alan Modra [Sat, 20 Jul 2013 09:50:16 +0000 (09:50 +0000)]
PR ld/15762
PR ld/12761
* elflink.c (elf_link_add_object_symbols): Don't clobber
.gnu.warning.symbol sections when shared.
Alan Modra [Sat, 20 Jul 2013 00:00:05 +0000 (00:00 +0000)]
daily update
Roland McGrath [Fri, 19 Jul 2013 23:07:08 +0000 (23:07 +0000)]
gold/
* options.h (General_options): Add -Trodata-segment option.
* parameters.cc (Parameters::check_rodata_segment): New function.
(Parameters::set_target_once): Call it.
* parameters.h (Parameters): Declare it (private member function).
* layout.cc (load_seg_unusable_for_headers): New function, broken
out of Layout::relaxation_loop_body. If TARGET->isolate_execinstr()
then validate rodata segment rather than text segment.
(relaxation_loop_body): Call that.
(is_text_segment): New function. Don't admit a non-executable
segment if TARGET->isolate_execinstr().
(set_segment_offsets): Call it. Honor -Trodata-segment option.
Yufeng Zhang [Fri, 19 Jul 2013 16:25:54 +0000 (16:25 +0000)]
[AArch64, ILP32] Retire -milp32 and -mlp64; use -mabi=ilp32 and -mabi=lp64.
gas/
* config/tc-aarch64.c (enum aarch64_abi_type): New enumeration tag.
(AARCH64_ABI_LP64, AARCH64_ABI_ILP32): New enumerators.
(aarch64_abi): New variable.
(ilp32_p): Change to be a macro.
(aarch64_opts): Remove the support for option -milp32 and -mlp64.
(struct aarch64_option_abi_value_table): New struct.
(aarch64_abis): New table.
(aarch64_parse_abi): New function.
(aarch64_long_opts): Add entry for -mabi=.
* doc/as.texinfo (Target AArch64 options): Document -mabi.
* doc/c-aarch64.texi: Likewise.
gas/testsuite/
* gas/aarch64/ilp32-basic.d (#as): Update to use -mabi=ilp32
Nick Clifton [Fri, 19 Jul 2013 13:21:55 +0000 (13:21 +0000)]
oops - omitted from previous delta
Nick Clifton [Fri, 19 Jul 2013 13:16:17 +0000 (13:16 +0000)]
* elf32-rx.c (rx_elf_relocate_section): Fix typo: move
saw_subtract from R_RX_OPdiv to R_RX_OPneg.
Nick Clifton [Fri, 19 Jul 2013 10:44:01 +0000 (10:44 +0000)]
PR binutils/15745
* readelf.c (get_unwind_section_word): Whilst searching for a
reloc section associated with an unwind section, check the type as
well as the section number.
Nick Clifton [Fri, 19 Jul 2013 10:39:51 +0000 (10:39 +0000)]
* ldgram.y: Add ALIGN_WITH_INPUT output section attribute.
* ldlang.c: Likewise.
* ldlang.h: Likewise.
* ldlex.l: Likewise.
* mri.c: Likewise.
* ld.texinfo: Document new feature.
* NEWS: Mention new feature.
* ld-scripts/script.exp: Run align with input test.
* ld-scripts/align-with-input.t: New file.
* ld-scripts/rgn-at8.d: Likewise.
* ld-scripts/rgn-at8.t: Likewise.
Will Newton [Fri, 19 Jul 2013 10:24:34 +0000 (10:24 +0000)]
gdb/testsuite/gdb.base: Enable disp-step-syscall.exp tests for ARM.
disp-step-syscall.exp is not run for ARM targets because ARM syscall
instructions have not been added to the list of possible syscall
instructions. This patch adds ARM syscall instructions to enable
disp-step-syscall.exp tests for ARM targets. Attached patch is tested
on ARMv7 and helps pass all disp-step-syscall.exp tests for ARM
targets.
gdb/testsuite/ChangeLog:
2013-07-19 Omair Javaid <Omair.Javaid@linaro.org>
* gdb.base/disp-step-syscall.exp: Add svc and swi syscall
instructions and enable disp-step-syscall for arm targets.
Will Newton [Fri, 19 Jul 2013 10:01:26 +0000 (10:01 +0000)]
gdb/testsuite/gdb.dwarf2: Replace @ with % for ARM compatability.
The ARM assembler recognises @ symbol as a comment marker and
therefore is unable to assemble some of gdb.dwarf2 testsuite tests.
This patch replaces all occurrences of @ symbol with % sign to allow
tests stay compatible with both ARM and x86 assembly. This patch has
been tested on x86_64 and ARMv7 targets.
gdb/testsuite/ChangeLog:
2013-07-19 Omair Javaid <Omair.Javaid@linaro.org>
* gdb.dwarf2/fission-reread.S: Replace @ sign with % sign to remove
assembler errors on arm.
* gdb.dwarf2/mac-fileno.S: Likewise.
* gdb.dwarf2/member-ptr-forwardref.S: Likewise.
* gdb.dwarf2/pr13961.S: Likewise.
Hui Zhu [Fri, 19 Jul 2013 07:26:46 +0000 (07:26 +0000)]
2013-07-19 Hui Zhu <hui@codesourcery.com>
PR gdb/15692
* mi/mi-cmd-break.c (mi_argv_to_format): Handle double quotes.
2013-07-19 Hui Zhu <hui@codesourcery.com>
PR gdb/15692
* gdb.mi/mi-dprintf.exp: Add double quotes test.
Alan Modra [Fri, 19 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Yao Qi [Thu, 18 Jul 2013 23:09:49 +0000 (23:09 +0000)]
gdb/
* target.c (update_current_target): Change the default action
of 'to_traceframe_info' from tcomplain to return_zero.
* target.h (struct target_ops) <to_traceframe_info>: Add more
comments.
* valops.c (read_value_memory): Call
traceframe_available_memory unconditionally.
gdb/testsuite/
* gdb.trace/read-memory.exp (test_from_remote): Update test.
(teset_from_exec): Likewise.
Yao Qi [Thu, 18 Jul 2013 23:04:00 +0000 (23:04 +0000)]
gdb/testsuite/
* gdb.trace/read-memory.c: New.
* gdb.trace/read-memory.exp: New.
Yao Qi [Thu, 18 Jul 2013 22:38:58 +0000 (22:38 +0000)]
gdb/testsuite/
* lib/gdb.exp (gdb_compile_shlib): Pass the tail name of
$dest to link options if host is remote. Move the
generated file to $dest.a on host if host is remote.
Nick Clifton [Thu, 18 Jul 2013 16:12:35 +0000 (16:12 +0000)]
* ar.c (usage): Fix C conformance issue.
* config/tc-i386-intel.c (i386_intel_operand): Fixed signed vs
unsigned comparison.
Will Newton [Thu, 18 Jul 2013 15:49:22 +0000 (15:49 +0000)]
gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads.
On Ubuntu by default the compiler passes --as-needed to ld which
means no DT_NEEDED entry is added for libpthread when building
the TLS tests. This causes the test to fail as libpthread is
required to look up TLS variables. Add calls to pthread_testcancel
to make sure libpthread gets linked.
gdb/testsuite/ChangeLog:
2013-07-18 Will Newton <will.newton@linaro.org>
* gdb.threads/tls-nodebug.c: Call pthread_testcancel
to ensure the test is linked against pthreads.
* gdb.threads/tls-var-main.c: Likewise.
* gdb.threads/tls-shared.c: Likewise.
Nick Clifton [Thu, 18 Jul 2013 15:39:21 +0000 (15:39 +0000)]
* doc/binutils.texi (nm, objdump): Remove bogus links to STABS
documentation.
Nick Clifton [Thu, 18 Jul 2013 14:08:42 +0000 (14:08 +0000)]
PR ld/15721
* elf32-msp430.c (R_MSP430_10_PCREL): Use 10-bit source and
destination masks.
* R_MSP430_2X_PCREL: Likewise.
* R_MSP430X_10_PCREL: Likewise.
* R_MSP430X_2X_PCREL: Likewise.
Nick Clifton [Thu, 18 Jul 2013 13:53:04 +0000 (13:53 +0000)]
PR binutils/15728
* basic-ops.h: (SUBWORDSIQI) Make declaration static.
* (SUBWORDSIHI): Likewise.
* (SUBWORDDIQI): Likewise.
* (SUBWORDDIHI): Likewise.
* (SUBWORDDISI): Likewise.
Nick Clifton [Thu, 18 Jul 2013 12:15:15 +0000 (12:15 +0000)]
* config/rx-defs.h: Add macros for RX100, RX200, RX600, and
RX610.
* config/rx-parse.y: (rx_check_float_support): Add function to
check floating point operation support for target RX100 and
RX200.
* config/tc-rx.c: Add CPU options RX100, RX200, RX600, and RX610.
* doc/c-rx.texi: Add -mcpu option to recognize macros for RX100,
RX200, RX600, and RX610
Nick Clifton [Thu, 18 Jul 2013 12:00:26 +0000 (12:00 +0000)]
* elf32-arm.c (arm_type_of_stub): Don't use ST_BRANCH_TO_ARM for
thumb only targets.
(elf32_arm_final_link_relocate): Likewise.
* ld-arm/thumb-b-lks-sym.d: Updated to be more flexible.
* ld-arm/thumb-bl-lks-sym.d: Likewise.
Nick Clifton [Thu, 18 Jul 2013 11:52:47 +0000 (11:52 +0000)]
* config/tc-avr.c (md_show_usage): Add avrxmega2 to help text
Nick Clifton [Thu, 18 Jul 2013 11:47:30 +0000 (11:47 +0000)]
* config/tc-avr.c: Make ata6289's ISA to AVR_ISA_AVR4.
* doc/c-avr.texi: Likewise.
Nick Clifton [Thu, 18 Jul 2013 11:40:37 +0000 (11:40 +0000)]
* mach-o.c (mach_o_section_name_xlat dw): Add entry for
.debug_gdb_scripts
Nick Clifton [Thu, 18 Jul 2013 11:24:11 +0000 (11:24 +0000)]
* elf32-arm.c (elf32_arm_stub_long_branch_arm_nacl): New variable.
(elf32_arm_stub_long_branch_arm_nacl_pic): New variable.
(arm_build_one_stub): Increase MAXRELOCS to 3.
(arm_type_of_stub): Use them if GLOBALS->nacl_p.
(struct elf32_arm_link_hash_table): Give add_stub_section member's
pointee type a third argument.
(elf32_arm_create_or_find_stub_sec): Update caller.
(elf32_arm_size_stubs): Update argument type.
* bfd-in.h (elf32_arm_size_stubs): Update decl.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* emultempl/armelf.em (elf32_arm_add_stub_section): Take third
argument ALIGNMENT_POWER, use it instead of constant 3.
* ld-arm/farcall-arm-nacl.d: New file.
* ld-arm/farcall-arm-nacl-pic.d: New file.
* ld-arm/farcall-data-nacl.d: New file.
* ld-arm/arm-elf.exp (armeabitests_common): Add extra element to
"action" lists for those cases to use a different dump file for NaCl
targets.
Massage $armeabitests_common to drop the extra element or the one
before it, depending on [istarget "arm*-*-nacl*"].
* ld-arm/arm-elf.exp (armelftests_common): Move all "Cortex-A8
erratum fix", Thumb-only and interworking cases to ...
(armelftests_nonacl): ... here.
(armeabitests_common): Move all "erratum 760522 fix", Thumb-only
and interworking cases to ...
(armeabitests_nonacl): ... here.
Nick Clifton [Thu, 18 Jul 2013 10:57:23 +0000 (10:57 +0000)]
* readelf.c (process_unwind): Do not return the result of a void
function.
Yao Qi [Thu, 18 Jul 2013 05:13:27 +0000 (05:13 +0000)]
gdb/testsuite/
* lib/future.exp (gdb_default_target_compile): Use tail name
of $destfile as the output name of compile. Move the
generated file to $destfile on build.
Yao Qi [Thu, 18 Jul 2013 05:07:25 +0000 (05:07 +0000)]
gdb/testsuite/
* lib/gdb.exp (gdb_compile): Set
gdb_saved_set_unbuffered_mode_obj to
set_unbuffered_mode_saved.o if host is remote. Invoke
remote_download to copy $unbuf_obj to host.
Yao Qi [Thu, 18 Jul 2013 01:47:00 +0000 (01:47 +0000)]
gdb/
Commit the changelog change for my previous commit.
Yao Qi [Thu, 18 Jul 2013 01:45:15 +0000 (01:45 +0000)]
gdb/
* coffread.c (coff_symfile_read): Iterate over minimal symbols,
if the name is prefixed by "__imp_" or "_imp_", look for minimal
symbol without prefix. If found, set its type to
'mst_solib_trampoline'.
Alan Modra [Thu, 18 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Doug Evans [Wed, 17 Jul 2013 20:35:11 +0000 (20:35 +0000)]
* NEWS: Mention "set print raw frame-arguments".
* gdbcmd.h (setprintrawlist, showprintrawlist): Declare.
* stack.c (print_raw_frame_arguments): New static global.
(print_frame_arg): Set opts.raw from print_raw_frame_arguments.
(_initialize_stack): New command "set/show print raw frame-arguments".
* valprint.c (setprintrawlist, showprintrawlist): New globals.
(set_print_raw, show_print_raw): New functions.
(_initialize_valprint): New prefix command "set/show print raw".
* valprint.h (value_print_options): Improve comments.
doc/
* gdb.texinfo (Print Settings): Document "print raw frame-arguments".
testsuite/
* gdb.python/py-frame-args.c: New file.
* gdb.python/py-frame-args.py: New file.
* gdb.python/py-frame-args.exp New file.
Doug Evans [Wed, 17 Jul 2013 20:26:28 +0000 (20:26 +0000)]
* cli/cli-cmds.c (init_cmd_lists): Delete unnecessary initialization
of all *list variables.
Doug Evans [Wed, 17 Jul 2013 19:01:48 +0000 (19:01 +0000)]
* gdbcmd.h (togglelist): Delete.
* cli/cli-cmds.c (togglelist): Delete.
(init_cmd_lists): Update.
* cli/cli-cmds.h (togglelist): Delete.
Tom Tromey [Wed, 17 Jul 2013 15:22:30 +0000 (15:22 +0000)]
* dwarf2read.c (dwarf2_per_objfile_free): Clear
dwarf2_per_objfile.
Richard Sandiford [Wed, 17 Jul 2013 08:06:11 +0000 (08:06 +0000)]
opcodes/
* mips-formats.h (MAPPED_INT, MAPPED_REG, REG_PAIR): Add
ATTRIBUTE_UNUSED.
Doug Evans [Wed, 17 Jul 2013 05:28:04 +0000 (05:28 +0000)]
* nto-tdep.c (nto_relocate_section_addresses): Update,
target_section.bfd deleted.
* ppc64-tdep.c (ppc64_convert_from_func_ptr_addr): Ditto.
* s390-tdep.c (s390_load): Ditto.
* solib-aix.c (solib_aix_relocate_section_addresses): Ditto.
Alan Modra [Wed, 17 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Andrew Burgess [Tue, 16 Jul 2013 21:12:14 +0000 (21:12 +0000)]
Check for NULL character before calling strchr.
http://sourceware.org/ml/gdb-patches/2013-07/msg00322.html
gdb/ChangeLog
* common/format.c (parse_format_string): Add checks for NULL
character before calling strchr.
gdb/testsuite/ChangeLog
* gdb.base/printcmds.exp (test_printf): Add tests for format
strings with missing format specifier.
Doug Evans [Tue, 16 Jul 2013 20:43:48 +0000 (20:43 +0000)]
* solist.h (target_so_ops.find_and_open_solib): Clarify usage of
temp_pathname argument.
* nto-tdep.c (nto_find_and_open_solib): Fix setting of temp_pathname
when opening the file fails.
Doug Evans [Tue, 16 Jul 2013 20:41:55 +0000 (20:41 +0000)]
* target.h (struct target_section): Delete member bfd.
All users updated to use the_bfd_section->owner instead.
* exec.c (add_to_section_table): Assert bfd is expected value.
Remove initialization of target_section.bfd.
(remove_target_sections): Update.
(section_table_available_memory): Update.
(section_table_xfer_memory_partial): Update.
(print_section_info): Update.
(exec_set_section_address): Update.
* record-full.c (record_full_core_xfer_partial): Update.
* solib-svr4.c (svr4_relocate_section_addresses): Update.
* solib-target.c (solib_target_relocate_section_addresses): Update.
* symfile.c (build_section_addr_info_from_section_table): Update.
* target.c (memory_xfer_live_readonly_partial): Update.
(memory_xfer_partial_1): Update.
Tom Tromey [Tue, 16 Jul 2013 18:52:18 +0000 (18:52 +0000)]
simple test suite fix in gdb.ada
This changes one spot in gdb.ada to use standard_testfile.
* gdb.ada/info_types.exp: Use standard_testfile.
Tom Tromey [Tue, 16 Jul 2013 18:49:32 +0000 (18:49 +0000)]
simple test suite fix in gdb.mi
This is another simple test suite change for the parallelization
project.
This changes mi-basics.exp to avoid the use of subdir and objdir and
instead use standard_output_file.
There are still some uses of objdir, but as noted in a new comment in
the patch, these uses are parallel-safe.
* gdb.mi/mi-basics.exp: Use standard_output_file.
(test_dir_specification, test_cwd_specification)
(test_path_specification): Use testsubdir, not subdir and objdir.
Tom Tromey [Tue, 16 Jul 2013 18:48:31 +0000 (18:48 +0000)]
test suite fixlet for gdb.trace
This is a minor fix to clean up the last remaining test suite
parallelization issue in gdb.trace.
mi-traceframe-changed.exp refers to objdir. This patch changes the
code to have the same effect, but avoid using that variable.
* gdb.trace/mi-traceframe-changed.exp: Don't use objdir.
Alan Modra [Tue, 16 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Richard Sandiford [Mon, 15 Jul 2013 18:36:57 +0000 (18:36 +0000)]
gas/
* config/tc-mips.c (match_save_restore_list_operand): Avoid -Wformat
error with older GCCs.
(mips16_macro_build): Dereference args.
Cary Coutant [Mon, 15 Jul 2013 16:49:20 +0000 (16:49 +0000)]
2013-07-15 Shawn Landden <shawnlandden@gmail.com>
gold/
PR gold/15070
* fileread.h (File_read::get_view): Clarify comment about ALIGNED.
* nacl.h (Sniff_file::View::View): Request aligned view.
Ulrich Weigand [Mon, 15 Jul 2013 16:01:26 +0000 (16:01 +0000)]
2013-07-15 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
* ppc-linux-nat.c: Since the new PowerPC specific ptrace interface is
now available for embedded (BookE) and server (BookS) processors,
correct mentions of 'booke' and adjust comments accordingly in order to
avoid confusion. Rename struct 'booke_debug_info' to 'hwdebug_info'.
(have_ptrace_booke_interface): Rename function and variable
'have_ptrace_booke_interface' to 'have_ptrace_hwdebug_interface'.
Rename struct 'booke_debug_info' to 'hwdebug_info'. Update all uses.
(booke_cmp_hw_point): Rename function 'booke_cmp_hw_point' to
'hwdebug_point_cmp'. Update all uses.
(booke_find_thread_points_by_tid): Rename function
'booke_find_thread_points_by_tid' to
'hwdebug_find_thread_points_by_tid'. Update all uses.
(booke_insert_point): Rename function 'booke_insert_point' to
'hwdebug_insert_point'. Update all uses.
(booke_remove_point): Rename function 'booke_remove_point' to
'hwdebug_remove_point'. Update all uses.
Maciej W. Rozycki [Mon, 15 Jul 2013 15:07:30 +0000 (15:07 +0000)]
include/elf/
* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment.
(Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE,
Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT,
Val_GNU_MIPS_ABI_FP_64): New enum.
bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded
magic numbers with enum values.
binutils/
* readelf.c (display_mips_gnu_attribute): Replace hardcoded magic
numbers with enum values.
gdb/
* mips-tdep.c (mips_gdbarch_init): Replace hardcoded magic
numbers with enum values.
Ali Anwar [Mon, 15 Jul 2013 11:14:32 +0000 (11:14 +0000)]
2013-07-15 Ali Anwar <ali_anwar@codesourcery.com>
PR threads/13217
* thread.c (thread_apply_all_command): Check for valid threads
and thread count.
(thread_array_cleanup): New struct.
(set_thread_refcount): New function.
Alan Modra [Mon, 15 Jul 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Richard Sandiford [Sun, 14 Jul 2013 14:25:57 +0000 (14:25 +0000)]
opcodes/
* Makefile.am (mips-opc.lo, micromips-opc.lo, mips16-opc.lo): Remove
special rules.
* Makefile.in: Regenerate.
* mips-opc.c, micromips-opc.c, mips16-opc.c: Explicitly initialize
all fields. Reformat.
Richard Sandiford [Sun, 14 Jul 2013 14:16:03 +0000 (14:16 +0000)]
gas/
* config/tc-mips.c (mips_prefer_vec_regno, mips_parse_register):
New functions, split out from...
(reg_lookup): ...here. Remove itbl support.
(reglist_lookup): Delete.
(mips_operand_token_type): New enum.
(mips_operand_token): New structure.
(mips_operand_tokens): New variable.
(mips_add_token, mips_parse_base_start, mips_parse_argument_token)
(mips_parse_arguments): New functions.
(md_begin): Initialize mips_operand_tokens.
(mips_arg_info): Add a token field. Remove optional_reg field.
(match_char, match_expression): New functions.
(match_const_int): Use match_expression. Remove "s" argument
and return a boolean result. Remove O_register handling.
(match_regno, match_reg, match_reg_range): New functions.
(match_int_operand, match_mapped_int_operand, match_msb_operand)
(match_reg_operand, match_reg_pair_operand, match_perf_reg_operand)
(match_addiusp_operand, match_clo_clz_dest_operand)
(match_lwm_swm_list_operand, match_entry_exit_operand)
(match_save_restore_list_operand, match_mdmx_imm_reg_operand)
(match_tied_reg_operand): Remove "s" argument and return a boolean
result. Match tokens rather than text. Update calls to
match_const_int. Rely on match_regno to call check_regno.
(match_pcrel_operand, match_pc_operand): Replace "s" argument with
"arg" argument. Return a boolean result.
(parse_float_constant): Replace with...
(match_float_constant): ...this new function.
(match_operand): Remove "s" argument and return a boolean result.
Update calls to subfunctions.
(mips_ip, mips16_ip): Call mips_parse_arguments. Use match routines
rather than string-parsing routines. Update handling of optional
registers for token scheme.
gas/testsuite/
* gas/mips/vr5400-ill.s, gas/mips/vr5400-ill.l: Add some more cases.
* gas/mips/micromips-ill.s, gas/mips/micromips-ill.l: New test.
* gas/mips/mips.exp: Run it.
Richard Sandiford [Sun, 14 Jul 2013 13:53:47 +0000 (13:53 +0000)]
gas/
* config/tc-mips.c (parse_float_constant): Split out from...
(mips_ip): ...here.
Richard Sandiford [Sun, 14 Jul 2013 13:52:52 +0000 (13:52 +0000)]
gas/
* config/tc-mips.c (INSERT_BITS, INSERT_OPERAND, MIPS16_INSERT_OPERAND):
Delete.
Richard Sandiford [Sun, 14 Jul 2013 13:51:52 +0000 (13:51 +0000)]
gas/
* config/tc-mips.c (mips32_to_16_reg_map): Delete.
(match_entry_exit_operand): New function.
(match_save_restore_list_operand): Likewise.
(match_operand): Use them.
(check_absolute_expr): Delete.
(mips16_ip): Rewrite main parsing loop to use mips_operands.
Richard Sandiford [Sun, 14 Jul 2013 13:49:14 +0000 (13:49 +0000)]
gas/
* config/tc-mips.c: Enable functions commented out in previous patch.
(SKIP_SPACE_TABS): Move further up file.
(mips32_to_micromips_reg_b_map, mips32_to_micromips_reg_c_map)
(mips32_to_micromips_reg_d_map, mips32_to_micromips_reg_e_map)
(ips32_to_micromips_reg_f_map, mips32_to_micromips_reg_g_map)
(mips32_to_micromips_reg_l_map, mips32_to_micromips_reg_m_map)
(mips32_to_micromips_reg_q_map, mips32_to_micromips_reg_n_map)
(micromips_imm_b_map, micromips_imm_c_map): Delete.
(mips_lookup_reg_pair): Delete.
(macro): Use report_bad_range and report_bad_field.
(mips_immed, expr_const_in_range): Delete.
(mips_ip): Rewrite main parsing loop to use new functions.
gas/testsuite/
* gas/mips/at-2.l: Remove duplicated $at warnings.
* gas/mips/ext-ill.l, gas/mips/lui-1.l, gas/mips/mips32r2-ill.l,
gas/mips/mips32r2-ill-nofp.l, gas/mips/mips32r2-ill-fp64.l,
gas/mips/mips64r2-ill.l, gas/mips/octeon-ill.l: Update error
messages. Expect negative numbers to be printed as such,
rather than as large unsigned positive numbers.
Richard Sandiford [Sun, 14 Jul 2013 13:44:25 +0000 (13:44 +0000)]
gas/
* config/tc-mips.c (mips_oddfpreg_ok): Move further up file.
Change return type to bfd_boolean.
(report_bad_range, report_bad_field): New functions.
(mips_arg_info): New structure.
(match_const_int, convert_reg_type, check_regno, match_int_operand)
(match_mapped_int_operand, match_msb_operand, match_reg_operand)
(match_reg_pair_operand, match_pcrel_operand, match_perf_reg_operand)
(match_addiusp_operand, match_clo_clz_dest_operand)
(match_lwm_swm_list_operand, match_mdmx_imm_reg_operand)
(match_pc_operand, match_tied_reg_operand, match_operand)
(check_completed_insn): New functions, commented out for now.
Richard Sandiford [Sun, 14 Jul 2013 13:37:51 +0000 (13:37 +0000)]
gas/
* config/tc-mips.c (insn_insert_operand): New function.
(macro_build, mips16_macro_build): Put null character check
in the for loop and convert continues to breaks. Use operand
structures to handle constant operands.