Will Newton [Tue, 11 Jun 2013 09:25:53 +0000 (09:25 +0000)]
bfd/elf64-aarch64.c: Use ELF64_R_SYM instead of ELF32_R_SYM.
Fix incorrect usage of ELF32_R_SYM introduced in ifunc changes.
bfd/ChangeLog:
2013-06-11 Will Newton <will.newton@linaro.org>
* elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
ELF64_R_SYM instead of ELF32_R_SYM.
Nick Clifton [Tue, 11 Jun 2013 07:21:40 +0000 (07:21 +0000)]
* elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
checks if the dynamic sections have been created and relaxation
has not been performed.
Alan Modra [Tue, 11 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Tue, 11 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Maciej W. Rozycki [Mon, 10 Jun 2013 18:15:48 +0000 (18:15 +0000)]
gas/
* config/tc-mips.c (append_insn): Don't do branch relaxation for
MIPS-3D instructions either.
(md_convert_frag): Update the COPx branch mask accordingly.
* config/tc-mips.c (md_show_usage): Document --[no-]relax-branch
option.
* doc/as.texinfo (Overview): Add --relax-branch and
--no-relax-branch.
* doc/c-mips.texi (MIPS Opts): Document --relax-branch and
--no-relax-branch.
gas/testsuite/
* gas/mips/relax-bc1any.l: New test.
* gas/mips/relax-bc1any.s: New test source.
* gas/mips/mips.exp: Run the new test.
Nick Clifton [Mon, 10 Jun 2013 11:59:44 +0000 (11:59 +0000)]
PR ld/15598
* ld.texinfo (Source Code Reference): Fix typos.
Mike Frysinger [Mon, 10 Jun 2013 02:25:35 +0000 (02:25 +0000)]
sim: bfin: only regen linux-fixed-code.h in maintainer mode
Since many people don't have a Blackfin toolchain available, only try to
regenerate the header file when in maintainer mode. This file rarely changes,
and when it does, we commit the generated output, so there's almost never a
need to run directly on an end system.
Sandra Loosemore [Mon, 10 Jun 2013 01:04:42 +0000 (01:04 +0000)]
2013-06-09 Sandra Loosemore <sandra@codesourcery.com>
opcodes/
* nios2-opc.c (nios2_builtin_opcodes): Give "trap" a type-"b"
argument.
gas/
* config/tc-nios2.c (nios2_parse_args): Allow trap argument to
omitted.
gas/testsuite/
* gas/nios2/trap.s: Add additional test cases for optional
argument.
* gas/nios2/trap.d: Likewise.
gdbadmin [Mon, 10 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Mon, 10 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Jan Kratochvil [Sun, 9 Jun 2013 17:08:47 +0000 (17:08 +0000)]
gdb/gdbserver/
Fix compatibility with Android Bionic.
* linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
it is not empty.
gdbadmin [Sun, 9 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 9 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Richard Sandiford [Sat, 8 Jun 2013 10:22:55 +0000 (10:22 +0000)]
gas/
2013-06-08 Catherine Moore <clm@codesourcery.com>
* config/tc-mips.c (is_opcode_valid): Build ASE mask.
(is_opcode_valid_16): Pass ase value to opcode_is_member.
(append_insn): Change INSN_xxxx to ASE_xxxx.
include/
2013-06-08 Catherine Moore <clm@codesourcery.com>
* opcode/mips.h (mips_opcode): Add ase field.
(INSN_ASE_MASK): Delete.
(INSN_DSP): Rename to ASE_DSP. Provide new value.
(INSN_DSPR2): Rename to ASE_DSPR2. Provide new value.
(INSN_MCU): Rename to ASE_MCU. Provide new value.
(INSN_MDMX): Rename to ASE_MDMX. Provide new value.
(INSN_MIPS3d): Rename to ASE_MIPS3D. Provide new value.
(INSN_MT): Rename to ASE_MT. Provide new value.
(INSN_SMARTMIPS): Rename to ASE_SMARTMIPS. Provide new value.
(INSN_VIRT): Rename to ASE_VIRT. Provide new value.
(INSN_VIRT64): Rename to ASE_VIRT64. Provide new value.
(opcode_is_member): Add ase argument. Check ase.
opcodes/
2013-06-08 Catherine Moore <clm@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* micromips-opc.c (D32, D33, MC): Update definitions.
(micromips_opcodes): Initialize ase field.
* mips-dis.c (mips_arch_choice): Add ase field.
(mips_arch_choices): Initialize ase field.
(set_default_mips_dis_options): Declare and setup mips_ase.
* mips-opc.c (M3D, SMT, MX, IVIRT, IVIRT64, D32, D33, D64,
MT32, MC): Update definitions.
(mips_builtin_opcodes): Initialize ase field.
Yao Qi [Sat, 8 Jun 2013 00:21:42 +0000 (00:21 +0000)]
gdb/
* mi/mi-main.c (get_register): Remove declaration.
(output_register): Declare.
(mi_cmd_data_list_register_values): Remove local variable
'tuple_cleanup'. Move some code into output_register.
(get_register): Renamed to ...
(output_register): ... this. Output the register's
"number" ui_out tuple here.
Alan Modra [Sat, 8 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Sat, 8 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Will Newton [Fri, 7 Jun 2013 18:57:03 +0000 (18:57 +0000)]
aarch64: Add support for GNU indirect functions.
Add support for STT_GNU_IFUNC symbols to the AArch64 bfd backend. The tests
are ported from the ld-ifunc tests but are enabled for cross builds so can
be run easily without hardware or a simulator.
bfd/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* configure: Regenerate.
* configure.in: Build elf-ifunc.o for AArch64.
* elf64-aarch64.c: Include objalloc.h.
(elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
(struct elf64_aarch64_link_hash_table): Add members for handling
R_AARCH64_IRELATIVE relocations.
(elf_aarch64_local_htab_hash): New function.
(elf_aarch64_local_htab_eq): New function.
(elf_aarch64_get_local_sym_hash): New function.
(elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
symbol hash.
(elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
(elf64_aarch64_final_link_relocate): Add sym argument. Add support
for handling STT_GNU_IFUNC symbols.
(elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
references to STT_GNU_IFUNC symbols.
(elf64_aarch64_adjust_dynamic_symbol): Add support for handling
STT_GNU_IFUNC symbols.
(elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
symbols. Ensure we don't increase plt.refcount from -1 to 0.
(elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
(elf64_aarch64_is_function_type): Remove function.
(elf64_aarch64_allocate_dynrelocs): Call
_bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
(elf_aarch64_allocate_local_dynrelocs): New function.
(elf64_aarch64_size_dynamic_sections): Call
elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
(elf64_aarch64_create_small_pltn_entry): Add info argument.
Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
(elf64_aarch64_finish_dynamic_symbol): Add support for handling
STT_GNU_IFUNC symbols and .iplt.
(elf_aarch64_finish_local_dynamic_symbol): New function.
(elf64_aarch64_finish_dynamic_sections): Call
elf_aarch64_finish_local_dynamic_symbol.
(elf64_aarch64_add_symbol_hook): New function.
include/elf/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* aarch64.h: Add R_AARCH64_IRELATIVE reloc.
ld/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* emulparams/aarch64elf.sh: Add IREL_IN_PLT.
ld/testsuite/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* ld-ifunc/ifunc.exp: Enable ifunc tests for AArch64.
* ld-aarch64/aarch64-elf.exp: Add ifunc tests.
* ld-aarch64/ifunc-1-local.d: New file.
* ld-aarch64/ifunc-1-local.s: Likewise.
* ld-aarch64/ifunc-1.d: Likewise.
* ld-aarch64/ifunc-1.s: Likewise.
* ld-aarch64/ifunc-10.d: Likewise.
* ld-aarch64/ifunc-10.s: Likewise.
* ld-aarch64/ifunc-11.d: Likewise.
* ld-aarch64/ifunc-11.s: Likewise.
* ld-aarch64/ifunc-12.d: Likewise.
* ld-aarch64/ifunc-12.s: Likewise.
* ld-aarch64/ifunc-13.d: Likewise.
* ld-aarch64/ifunc-13a.s: Likewise.
* ld-aarch64/ifunc-13b.s: Likewise.
* ld-aarch64/ifunc-14a.d: Likewise.
* ld-aarch64/ifunc-14a.s: Likewise.
* ld-aarch64/ifunc-14b.d: Likewise.
* ld-aarch64/ifunc-14b.s: Likewise.
* ld-aarch64/ifunc-14c.d: Likewise.
* ld-aarch64/ifunc-14c.s: Likewise.
* ld-aarch64/ifunc-14d.d: Likewise.
* ld-aarch64/ifunc-14e.d: Likewise.
* ld-aarch64/ifunc-14f.d: Likewise.
* ld-aarch64/ifunc-15.d: Likewise.
* ld-aarch64/ifunc-15.s: Likewise.
* ld-aarch64/ifunc-16.d: Likewise.
* ld-aarch64/ifunc-16.s: Likewise.
* ld-aarch64/ifunc-17a.d: Likewise.
* ld-aarch64/ifunc-17a.s: Likewise.
* ld-aarch64/ifunc-17b.d: Likewise.
* ld-aarch64/ifunc-17b.s: Likewise.
* ld-aarch64/ifunc-18a.d: Likewise.
* ld-aarch64/ifunc-18a.s: Likewise.
* ld-aarch64/ifunc-18b.d: Likewise.
* ld-aarch64/ifunc-18b.s: Likewise.
* ld-aarch64/ifunc-19a.d: Likewise.
* ld-aarch64/ifunc-19a.s: Likewise.
* ld-aarch64/ifunc-19b.d: Likewise.
* ld-aarch64/ifunc-19b.s: Likewise.
* ld-aarch64/ifunc-2-local.d: Likewise.
* ld-aarch64/ifunc-2-local.s: Likewise.
* ld-aarch64/ifunc-2.d: Likewise.
* ld-aarch64/ifunc-2.s: Likewise.
* ld-aarch64/ifunc-20.d: Likewise.
* ld-aarch64/ifunc-20.s: Likewise.
* ld-aarch64/ifunc-3.s: Likewise.
* ld-aarch64/ifunc-3a.d: Likewise.
* ld-aarch64/ifunc-3b.d: Likewise.
* ld-aarch64/ifunc-4.d: Likewise.
* ld-aarch64/ifunc-4.s: Likewise.
* ld-aarch64/ifunc-4a.d: Likewise.
* ld-aarch64/ifunc-5-local.s: Likewise.
* ld-aarch64/ifunc-5.s: Likewise.
* ld-aarch64/ifunc-5a-local.d: Likewise.
* ld-aarch64/ifunc-5a.d: Likewise.
* ld-aarch64/ifunc-5b-local.d: Likewise.
* ld-aarch64/ifunc-5b.d: Likewise.
* ld-aarch64/ifunc-5r-local.d: Likewise.
* ld-aarch64/ifunc-6.s: Likewise.
* ld-aarch64/ifunc-6a.d: Likewise.
* ld-aarch64/ifunc-6b.d: Likewise.
* ld-aarch64/ifunc-7.s: Likewise.
* ld-aarch64/ifunc-7a.d: Likewise.
* ld-aarch64/ifunc-7b.d: Likewise.
* ld-aarch64/ifunc-8.d: Likewise.
* ld-aarch64/ifunc-8a.s: Likewise.
* ld-aarch64/ifunc-8b.s: Likewise.
* ld-aarch64/ifunc-9.d: Likewise.
* ld-aarch64/ifunc-9.s: Likewise.
Pedro Alves [Fri, 7 Jun 2013 17:31:09 +0000 (17:31 +0000)]
Remove superfluous semicolons from testsuite throughout.
A few months ago semicolons after "return" were removed throughout the
testsuite. However, as I pointed out in review, they're unnecessary
not just after "return", but pretty much after any tcl command. ';'
is the command separator, and you only need it if there's another
command on the same line afterwards.
This patch was written by running:
$ find . -name "*.exp" | xargs grep -l ";\s*$" | xargs sed -i 's/\([^#][^\s*;]*\)\s*;\s*$/\1/'
and then undoing changes to comments, and lib/future.exp.
Tested on x86_64 Fedora 17.
gdb/testsuite/
2013-06-07 Pedro Alves <palves@redhat.com>
* boards/native-extended-gdbserver.exp: Remove semicolon.
* config/arm-ice.exp: Likewise.
* config/bfin.exp: Likewise.
* config/cygmon.exp: Likewise.
* config/h8300.exp: Likewise.
* config/monitor.exp: Likewise.
* config/sid.exp: Likewise.
* config/sim.exp: Likewise.
* config/slite.exp: Likewise.
* config/vx.exp: Likewise.
* gdb.arch/i386-bp_permanent.exp: Likewise.
* gdb.asm/asm-source.exp: Likewise.
* gdb.base/args.exp: Likewise.
* gdb.base/attach-pie-misread.exp: Likewise.
* gdb.base/auxv.exp: Likewise.
* gdb.base/bigcore.exp: Likewise.
* gdb.base/bitfields2.exp: Likewise.
* gdb.base/bitfields.exp: Likewise.
* gdb.base/break.exp: Likewise.
* gdb.base/break-interp.exp: Likewise.
* gdb.base/callfuncs.exp: Likewise.
* gdb.base/call-sc.exp: Likewise.
* gdb.base/commands.exp: Likewise.
* gdb.base/corefile.exp: Likewise.
* gdb.base/dbx.exp: Likewise.
* gdb.base/ending-run.exp: Likewise.
* gdb.base/exprs.exp: Likewise.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/hbreak2.exp: Likewise.
* gdb.base/huge.exp: Likewise.
* gdb.base/list.exp: Likewise.
* gdb.base/memattr.exp: Likewise.
* gdb.base/overlays.exp: Likewise.
* gdb.base/printcmds.exp: Likewise.
* gdb.base/recurse.exp: Likewise.
* gdb.base/remotetimeout.exp: Likewise.
* gdb.base/reread.exp: Likewise.
* gdb.base/savedregs.exp: Likewise.
* gdb.base/scope.exp: Likewise.
* gdb.base/sepdebug.exp: Likewise.
* gdb.base/setshow.exp: Likewise.
* gdb.base/setvar.exp: Likewise.
* gdb.base/sigaltstack.exp: Likewise.
* gdb.base/siginfo-addr.exp: Likewise.
* gdb.base/siginfo.exp: Likewise.
* gdb.base/siginfo-obj.exp: Likewise.
* gdb.base/sigrepeat.exp: Likewise.
* gdb.base/sigstep.exp: Likewise.
* gdb.base/structs.exp: Likewise.
* gdb.base/testenv.exp: Likewise.
* gdb.base/twice.exp: Likewise.
* gdb.base/valgrind-db-attach.exp: Likewise.
* gdb.base/valgrind-infcall.exp: Likewise.
* gdb.base/varargs.exp: Likewise.
* gdb.base/watchpoint.exp: Likewise.
* gdb.cp/gdb1355.exp: Likewise.
* gdb.cp/misc.exp: Likewise.
* gdb.disasm/hppa.exp: Likewise.
* gdb.disasm/t01_mov.exp: Likewise.
* gdb.disasm/t02_mova.exp: Likewise.
* gdb.disasm/t03_add.exp: Likewise.
* gdb.disasm/t04_sub.exp: Likewise.
* gdb.disasm/t05_cmp.exp: Likewise.
* gdb.disasm/t06_ari2.exp: Likewise.
* gdb.disasm/t07_ari3.exp: Likewise.
* gdb.disasm/t08_or.exp: Likewise.
* gdb.disasm/t09_xor.exp: Likewise.
* gdb.disasm/t10_and.exp: Likewise.
* gdb.disasm/t11_logs.exp: Likewise.
* gdb.disasm/t12_bit.exp: Likewise.
* gdb.disasm/t13_otr.exp: Likewise.
* gdb.gdb/selftest.exp: Likewise.
* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
* gdb.mi/mi-reverse.exp: Likewise.
* gdb.pascal/floats.exp: Likewise.
* gdb.python/py-inferior.exp: Likewise.
* gdb.threads/attach-into-signal.exp: Likewise.
* gdb.threads/pthreads.exp: Likewise.
* gdb.threads/thread_events.exp: Likewise.
* gdb.threads/watchthreads.exp: Likewise.
* gdb.trace/actions-changed.exp: Likewise.
* gdb.trace/actions.exp: Likewise.
* gdb.trace/ax.exp: Likewise.
* gdb.trace/backtrace.exp: Likewise.
* gdb.trace/change-loc.exp: Likewise.
* gdb.trace/deltrace.exp: Likewise.
* gdb.trace/disconnected-tracing.exp: Likewise.
* gdb.trace/ftrace.exp: Likewise.
* gdb.trace/infotrace.exp: Likewise.
* gdb.trace/passc-dyn.exp: Likewise.
* gdb.trace/passcount.exp: Likewise.
* gdb.trace/pending.exp: Likewise.
* gdb.trace/qtro.exp: Likewise.
* gdb.trace/range-stepping.exp: Likewise.
* gdb.trace/report.exp: Likewise.
* gdb.trace/save-trace.exp: Likewise.
* gdb.trace/status-stop.exp: Likewise.
* gdb.trace/strace.exp: Likewise.
* gdb.trace/tfile.exp: Likewise.
* gdb.trace/tfind.exp: Likewise.
* gdb.trace/trace-break.exp: Likewise.
* gdb.trace/tracecmd.exp: Likewise.
* gdb.trace/trace-mt.exp: Likewise.
* gdb.trace/tspeed.exp: Likewise.
* gdb.trace/tsv.exp: Likewise.
* gdb.trace/while-stepping.exp: Likewise.
* lib/gdb.exp: Likewise.
* lib/gdbserver-support.exp: Likewise.
* lib/java.exp: Likewise.
* lib/mi-support.exp: Likewise.
* lib/pascal.exp: Likewise.
* lib/prompt.exp: Likewise.
* lib/trace-support.exp: Likewise.
Nick Clifton [Fri, 7 Jun 2013 15:11:18 +0000 (15:11 +0000)]
* ld.texinfo (SEGMENT_START): Rephrase to indicate that a -T
option must appear before the SEGMENT_START is encountered in
order for the default value to be overridden.
Pedro Alves [Fri, 7 Jun 2013 14:39:33 +0000 (14:39 +0000)]
Fix formating in copyright headers.
File list found with:
$ grep "along with this program" * -A 1 -rn \
| grep "*/" \
| grep -v "along with this program" \
| sed 's,-[0-9]\+-.*,,g'
Tested on x86_64 Fedora 17.
gdb/
2013-06-07 Pedro Alves <palves@redhat.com>
* darwin-nat.c: Fix formating in copyright header.
* darwin-nat.h: Likewise.
* gnu-nat.c: Likewise.
* machoread.c: Likewise.
gdb/testsuite/
2013-06-07 Pedro Alves <palves@redhat.com>
* gdb.ada/info_types.c: Fix formating in copyright header.
* gdb.base/break-on-linker-gcd-function.cc: Likewise.
* gdb.base/float.c: Likewise.
* gdb.base/inferior-died.c: Likewise.
* gdb.base/interp.c: Likewise.
* gdb.base/jit-main.c: Likewise.
* gdb.base/jit-solib.c: Likewise.
* gdb.base/long_long.c: Likewise.
* gdb.base/longjmp.c: Likewise.
* gdb.base/nextoverexit.c: Likewise.
* gdb.base/pr11022.c: Likewise.
* gdb.base/prelink-lib.c: Likewise.
* gdb.base/prelink.c: Likewise.
* gdb.base/prologue.c: Likewise.
* gdb.base/restore.c: Likewise.
* gdb.base/sigchld.c: Likewise.
* gdb.base/solib-search-lib1.c: Likewise.
* gdb.base/solib-search-lib2.c: Likewise.
* gdb.base/solib-search.c: Likewise.
* gdb.base/solib-search.h: Likewise.
* gdb.base/whatis.c: Likewise.
* gdb.cp/abstract-origin.cc: Likewise.
* gdb.cp/anon-struct.cc: Likewise.
* gdb.cp/baseenum.cc: Likewise.
* gdb.cp/bs15503.cc: Likewise.
* gdb.cp/call-c-1.c: Likewise.
* gdb.cp/call-c.cc: Likewise.
* gdb.cp/class2.cc: Likewise.
* gdb.cp/classes.cc: Likewise.
* gdb.cp/cttiadd.cc: Likewise.
* gdb.cp/cttiadd1.cc: Likewise.
* gdb.cp/cttiadd2.cc: Likewise.
* gdb.cp/cttiadd3.cc: Likewise.
* gdb.cp/derivation.cc: Likewise.
* gdb.cp/derivation2.cc: Likewise.
* gdb.cp/dispcxx.cc: Likewise.
* gdb.cp/exception.cc: Likewise.
* gdb.cp/gdb2384-base.cc: Likewise.
* gdb.cp/gdb2384-base.h: Likewise.
* gdb.cp/gdb2384.cc: Likewise.
* gdb.cp/gdb2495.cc: Likewise.
* gdb.cp/mb-inline.h: Likewise.
* gdb.cp/mb-inline1.cc: Likewise.
* gdb.cp/mb-inline2.cc: Likewise.
* gdb.cp/member-name.cc: Likewise.
* gdb.cp/member-ptr.cc: Likewise.
* gdb.cp/misc.cc: Likewise.
* gdb.cp/namespace1.cc: Likewise.
* gdb.cp/nextoverthrow.cc: Likewise.
* gdb.cp/pr-574.cc: Likewise.
* gdb.cp/pr9631.cc: Likewise.
* gdb.cp/printmethod.cc: Likewise.
* gdb.cp/psmang1.cc: Likewise.
* gdb.cp/psmang2.cc: Likewise.
* gdb.cp/psymtab-parameter.cc: Likewise.
* gdb.cp/ptype-flags.cc: Likewise.
* gdb.cp/ref-params.cc: Likewise.
* gdb.cp/ref-types.cc: Likewise.
* gdb.cp/smartp.cc: Likewise.
* gdb.cp/try_catch.cc: Likewise.
* gdb.cp/userdef.cc: Likewise.
* gdb.cp/using-crash.cc: Likewise.
* gdb.cp/virtfunc.cc: Likewise.
* gdb.cp/virtfunc2.cc: Likewise.
* gdb.dwarf2/callframecfa.S: Likewise.
* gdb.dwarf2/dw2-ranges.c: Likewise.
* gdb.dwarf2/dw2-ranges2.c: Likewise.
* gdb.dwarf2/dw2-ranges3.c: Likewise.
* gdb.dwarf2/dw2-restore.S: Likewise.
* gdb.dwarf2/pieces.S: Likewise.
* gdb.dwarf2/valop.S: Likewise.
* gdb.java/jnpe.java: Likewise.
* gdb.mi/mi-stepn.c: Likewise.
* gdb.mi/mi-var-cp.cc: Likewise.
* gdb.mi/mi-var-rtti.cc: Likewise.
* gdb.mi/ns-stale-regcache.c: Likewise.
* gdb.mi/pr11022.c: Likewise.
* gdb.mi/solib-lib.c: Likewise.
* gdb.mi/solib-main.c: Likewise.
* gdb.python/py-arch.c: Likewise.
* gdb.python/py-block.c: Likewise.
* gdb.python/py-breakpoint.c: Likewise.
* gdb.python/py-events.c: Likewise.
* gdb.python/py-evthreads.c: Likewise.
* gdb.python/py-explore.c: Likewise.
* gdb.python/py-explore.cc: Likewise.
* gdb.python/py-finish-breakpoint.c: Likewise.
* gdb.python/py-finish-breakpoint2.cc: Likewise.
* gdb.python/py-symbol.c: Likewise.
* gdb.threads/execl.c: Likewise.
* gdb.threads/execl1.c: Likewise.
Pedro Alves [Fri, 7 Jun 2013 10:55:22 +0000 (10:55 +0000)]
Mention PR server/14823 in ChangeLogs.
Pedro Alves [Fri, 7 Jun 2013 10:46:59 +0000 (10:46 +0000)]
[GDBserver] Multi-process + multi-arch
This patch makes GDBserver support multi-process + biarch.
Currently, if you're debugging more than one process at once with a
single gdbserver (in extended-remote mode), then all processes must
have the same architecture (e.g., 64-bit vs 32-bit). Otherwise, you
see this:
Added inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
Reading symbols from /home/pedro/gdb/tests/main32...done.
Temporary breakpoint 2 at 0x4004cf: main. (2 locations)
Starting program: /home/pedro/gdb/tests/main32
warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64
warning: Architecture rejected target-supplied description
Remote 'g' packet reply is too long: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090cfffff0000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000b042f7460000000000020000230000002b0000002b0000002b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f03000000000000ffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f00003b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
... etc, etc ...
Even though the process was running a 32-bit program, GDBserver sent
back to GDB a register set in 64-bit layout.
A patch (http://sourceware.org/ml/gdb-patches/2012-11/msg00228.html) a
while ago made GDB track a target_gdbarch per inferior, and as
consequence, fetch a target description per-inferior. This patch is
the GDBserver counterpart, that makes GDBserver keep track of each
process'es XML target description and register layout. So in the
example above, GDBserver will send the correct register set in 32-bit
layout to GDB.
A new "struct target_desc" object (tdesc for short) is added, that
holds the target description and register layout information about
each process. Each `struct process_info' holds a pointer to a target
description. The regcache also gains a pointer to a target
description, mainly for convenience, and parallel with GDB (and
possible future support for programs that flip processor modes).
The low target's arch_setup routines are responsible for setting the
process'es correct tdesc. This isn't that much different to how
things were done before, except that instead of detecting the inferior
process'es architecture and calling the corresponding
init_registers_FOO routine, which would change the regcache layout
globals and recreate the threads' regcaches, the regcache.c globals
are gone, and the init_registers_$BAR routines now each initialize a
separate global struct target_desc object (one for each arch variant
GDBserver supports), and so all the init_registers_$BAR routines that
are built into GDBserver are called early at GDBserver startup time
(similarly to how GDB handles its built-in target descriptions), and
then the arch_setup routine is responsible for making
process_info->tdesc point to one of these target description globals.
The regcache module is all parameterized to get the regcache's layout
from the tdesc object instead of the old register_bytes, etc. globals.
The threads' regcaches are now created lazily. The old scheme where
we created each of them when we added a new thread doesn't work
anymore, because we add the main thread/lwp before we see it stop for
the first time, and it is only when we see the thread stop for the
first time that we have a chance of determining the inferior's
architecture (through the_low_target.arch_setup). Therefore when we
add the main thread we don't know which architecture/tdesc its
regcache should have.
This patch makes the gdb.multi/multi-arch.exp test now pass against
(extended-remote) GDBserver. It currently fails, without this patch.
The IPA also uses the regcache, so it gains a new global struct
target_desc pointer, which points at the description of the process it
is loaded in.
Re. the linux-low.c & friends changes. Since the register map
etc. may differ between processes (64-bit vs 32-bit) etc., the
linux_target_ops num_regs, regmap and regset_bitmap data fields are no
longer sufficient. A new method is added in their place that returns
a pointer to a new struct that includes all info linux-low.c needs to
access registers of the current inferior.
The patch/discussion that originally introduced
linux-low.c:disabled_regsets mentions that the disabled_regsets set
may be different per mode (in a biarch setup), and indeed that is
cleared whenever we start a new (first) inferior, so that global is
moved as well behind the new `struct regs_info'.
On the x86 side:
I simply replaced the i387-fp.c:num_xmm_registers global with a check
for 64-bit or 32-bit process, which is equivalent to how the global
was set. This avoided coming up with some more general mechanism that
would work for all targets that use this module (GNU/Linux, Windows,
etc.).
Tested:
GNU/Linux IA64
GNU/Linux MIPS64
GNU/Linux PowerPC (Fedora 16)
GNU/Linux s390x (Fedora 16)
GNU/Linux sparc64 (Debian)
GNU/Linux x86_64, -m64 and -m32 (Fedora 17)
Cross built, and smoke tested:
i686-w64-mingw32, under Wine.
GNU/Linux TI C6x, by Yao Qi.
Cross built but otherwise not tested:
aarch64-linux-gnu
arm-linux-gnu
m68k-linux
nios2-linux-gnu
sh-linux-gnu
spu
tilegx-unknown-linux-gnu
Completely untested:
GNU/Linux Blackfin
GNU/Linux CRIS
GNU/Linux CRISv32
GNU/Linux TI Xtensa
GNU/Linux M32R
LynxOS
QNX NTO
gdb/gdbserver/
2013-06-07 Pedro Alves <palves@redhat.com>
* Makefile.in (OBS): Add tdesc.o.
(IPA_OBJS): Add tdesc-ipa.o.
(tdesc-ipa.o): New rule.
* ax.c (gdb_eval_agent_expr): Adjust register_size call to new
interface.
* linux-low.c (new_inferior): Delete.
(disabled_regsets, num_regsets): Delete.
(linux_add_process): Adjust to set the new per-process
new_inferior flag.
(linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
(linux_wait_for_lwp): Adjust. Only call arch_setup if the event
was a stop. When calling arch_setup, switch the current inferior
to the thread that got an event.
(linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
(regsets_fetch_inferior_registers)
(regsets_store_inferior_registers): New regsets_info parameter.
Adjust to use it.
(linux_register_in_regsets): New regs_info parameter. Adjust to
use it.
(register_addr, fetch_register, store_register): New usrregs_info
parameter. Adjust to use it.
(usr_fetch_inferior_registers, usr_store_inferior_registers): New
parameter regs_info. Adjust to use it.
(linux_fetch_registers): Get the current inferior's regs_info, and
adjust to use it.
(linux_store_registers): Ditto.
[HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
(initialize_low): Don't initialize the target_regsets here. Call
initialize_low_arch.
* linux-low.h (target_regsets): Delete declaration.
(struct regsets_info): New.
(struct usrregs_info): New.
(struct regs_info): New.
(struct process_info_private) <new_inferior>: New field.
(struct linux_target_ops): Delete the num_regs, regmap, and
regset_bitmap fields. New field regs_info.
[HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
* i387-fp.c (num_xmm_registers): Delete.
(i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
calls to new interface.
(i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
(i387_xsave_to_cache): Adjust find_regno calls to new interface.
Infer the number of xmm registers from the regcache's target
description.
* i387-fp.h (num_xmm_registers): Delete.
* inferiors.c (add_thread): Don't install the thread's regcache
here.
* proc-service.c (gregset_info): Fetch the current inferior's
regs_info. Adjust to use it.
* regcache.c: Include tdesc.h.
(register_bytes, reg_defs, num_registers)
(gdbserver_expedite_regs): Delete.
(get_thread_regcache): If the thread doesn't have a regcache yet,
create one, instead of aborting gdbserver.
(regcache_invalidate_one): Rename to ...
(regcache_invalidate_thread): ... this.
(regcache_invalidate_one): New.
(regcache_invalidate): Only invalidate registers of the current
process.
(init_register_cache): Add target_desc parameter, and use it.
(new_register_cache): Ditto. Assert the target description has a
non zero registers_size.
(regcache_cpy): Add assertions. Adjust.
(realloc_register_cache, set_register_cache): Delete.
(registers_to_string, registers_from_string): Adjust.
(find_register_by_name, find_regno, find_register_by_number)
(register_cache_size): Add target_desc parameter, and use it.
(free_register_cache_thread, free_register_cache_thread_one)
(regcache_release, register_cache_size): New.
(register_size): Add target_desc parameter, and use it.
(register_data, supply_register, supply_register_zeroed)
(supply_regblock, supply_register_by_name, collect_register)
(collect_register_as_string, collect_register_by_name): Adjust.
* regcache.h (struct target_desc): Forward declare.
(struct regcache) <tdesc>: New field.
(init_register_cache, new_register_cache): Add target_desc
parameter.
(regcache_invalidate_thread): Declare.
(regcache_invalidate_one): Delete declaration.
(regcache_release): Declare.
(find_register_by_number, register_cache_size, register_size)
(find_regno): Add target_desc parameter.
(gdbserver_expedite_regs, gdbserver_xmltarget): Delete
declarations.
* remote-utils.c: Include tdesc.h.
(outreg, prepare_resume_reply): Adjust.
* server.c: Include tdesc.h.
(gdbserver_xmltarget): Delete declaration.
(get_features_xml, process_serial_event): Adjust.
* server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
declare.
(struct process_info) <tdesc>: New field.
(ipa_tdesc): Declare.
* tdesc.c: New file.
* tdesc.h: New file.
* tracepoint.c: Include tdesc.h.
[IN_PROCESS_AGENT] (ipa_tdesc): Define.
(get_context_regcache): Adjust to pass ipa_tdesc down.
(do_action_at_tracepoint): Adjust to get the register cache size
from the context regcache's description.
(traceframe_walk_blocks): Adjust to get the register cache size
from the current trace frame's description.
(traceframe_get_pc): Adjust to get current trace frame's
description and pass it down.
(gdb_collect): Adjust to get the register cache size from the
IPA's description.
* linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
(gdbserver_xmltarget): Delete.
(initialize_low_tracepoint): Set the ipa's target description.
* linux-i386-ipa.c (tdesc_i386_linux): Declare.
(initialize_low_tracepoint): Set the ipa's target description.
* linux-x86-low.c: Include tdesc.h.
[__x86_64__] (is_64bit_tdesc): New.
(ps_get_thread_area, x86_get_thread_area): Use it.
(i386_cannot_store_register): Rename to ...
(x86_cannot_store_register): ... this. Use is_64bit_tdesc.
(i386_cannot_fetch_register): Rename to ...
(x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
(x86_fill_gregset, x86_store_gregset): Adjust register_size calls
to new interface.
(target_regsets): Rename to ...
(x86_regsets): ... this.
(x86_get_pc, x86_set_pc): Adjust register_size calls to new
interface.
(x86_siginfo_fixup): Use is_64bit_tdesc.
[__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
(tdesc_x32_avx_linux, tdesc_x32_linux)
(tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
Declare.
(x86_linux_update_xmltarget): Delete.
(I386_LINUX_XSAVE_XCR0_OFFSET): Define.
(have_ptrace_getfpxregs, have_ptrace_getregset): New.
(AMD64_LINUX_USER64_CS): New.
(x86_linux_read_description): New, based on
x86_linux_update_xmltarget.
(same_process_callback): New.
(x86_arch_setup_process_callback): New.
(x86_linux_update_xmltarget): New.
(x86_regsets_info): New.
(amd64_linux_regs_info): New.
(i386_linux_usrregs_info): New.
(i386_linux_regs_info): New.
(x86_linux_regs_info): New.
(x86_arch_setup): Reimplement.
(x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
(x86_emit_ops): Ditto.
(the_low_target): Adjust. Install x86_linux_regs_info,
x86_cannot_fetch_register, and x86_cannot_store_register.
(initialize_low_arch): New.
* linux-ia64-low.c (tdesc_ia64): Declare.
(ia64_fetch_register): Adjust.
(ia64_usrregs_info, regs_info): New globals.
(ia64_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-sparc-low.c (tdesc_sparc64): Declare.
(sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
Adjust.
(sparc_arch_setup): New function.
(sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
(tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
(tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
(tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
(tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
(tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
(tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
(tdesc_powerpc_isa205_vsx64l): Declare.
(ppc_cannot_store_register, ppc_collect_ptrace_register)
(ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
(ppc_set_pc, ppc_get_hwcap): Adjust.
(ppc_usrregs_info): Forward declare.
(!__powerpc64__) ppc_regmap_adjusted: New global.
(ppc_arch_setup): Adjust to the current process'es target
description.
(ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
(ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
(ppc_store_evrregset): Adjust.
(target_regsets): Rename to ...
(ppc_regsets): ... this, and make static.
(ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
(ppc_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
(tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
(tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
(tdesc_s390x_linux64v2): Declare.
(s390_collect_ptrace_register, s390_supply_ptrace_register)
(s390_fill_gregset, s390_store_last_break): Adjust.
(target_regsets): Rename to ...
(s390_regsets): ... this, and make static.
(s390_get_pc, s390_set_pc): Adjust.
(s390_get_hwcap): New target_desc parameter, and use it.
[__s390x__] (have_hwcap_s390_high_gprs): New global.
(s390_arch_setup): Adjust to set the current process'es target
description. Don't adjust the regmap.
(s390_usrregs_info, s390_regsets_info, regs_info): New globals.
[__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
(regs_info_3264): New globals.
(s390_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
(tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
[__mips64] (init_registers_mips_linux)
(init_registers_mips_dsp_linux): Delete defines.
[__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
(have_dsp): New global.
(mips_read_description): New, based on mips_arch_setup.
(mips_arch_setup): Reimplement.
(get_usrregs_info): New function.
(mips_cannot_fetch_register, mips_cannot_store_register)
(mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
(mips_fill_fpregset, mips_store_fpregset): Adjust.
(target_regsets): Rename to ...
(mips_regsets): ... this, and make static.
(mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
(dsp_regs_info, regs_info): New globals.
(mips_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
(tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
Declare.
(arm_fill_vfpregset, arm_store_vfpregset): Adjust.
(arm_read_description): New, with bits factored from
arm_arch_setup.
(arm_arch_setup): Reimplement.
(target_regsets): Rename to ...
(arm_regsets): ... this, and make static.
(arm_regsets_info, arm_usrregs_info, regs_info): New globals.
(arm_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-m68k-low.c (tdesc_m68k): Declare.
(target_regsets): Rename to ...
(m68k_regsets): ... this, and make static.
(m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
(m68k_regs_info): New function.
(m68k_arch_setup): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-sh-low.c (tdesc_sharch): Declare.
(target_regsets): Rename to ...
(sh_regsets): ... this, and make static.
(sh_regsets_info, sh_usrregs_info, regs_info): New globals.
(sh_regs_info, sh_arch_setup): New functions.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-bfin-low.c (tdesc_bfin): Declare.
(bfin_arch_setup): New function.
(bfin_usrregs_info, regs_info): New globals.
(bfin_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-cris-low.c (tdesc_cris): Declare.
(cris_arch_setup): New function.
(cris_usrregs_info, regs_info): New globals.
(cris_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-cris-low.c (tdesc_crisv32): Declare.
(cris_arch_setup): New function.
(cris_regsets_info, cris_usrregs_info, regs_info): New globals.
(cris_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-m32r-low.c (tdesc_m32r): Declare.
(m32r_arch_setup): New function.
(m32r_usrregs_info, regs_info): New globals.
(m32r_regs_info): Adjust.
(initialize_low_arch): New function.
* linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
(tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
(tic6x_usrregs_info): Forward declare.
(tic6x_read_description): New function, based on ...
(tic6x_arch_setup): ... this. Reimplement.
(target_regsets): Rename to ...
(tic6x_regsets): ... this, and make static.
(tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
(tic6x_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-xtensa-low.c (tdesc_xtensa): Declare.
(xtensa_fill_gregset, xtensa_store_gregset): Adjust.
(target_regsets): Rename to ...
(xtensa_regsets): ... this, and make static.
(xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
globals.
(xtensa_arch_setup, xtensa_regs_info): New functions.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-nios2-low.c (tdesc_nios2_linux): Declare.
(nios2_arch_setup): Set the current process'es tdesc.
(target_regsets): Rename to ...
(nios2_regsets): ... this.
(nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
(nios2_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-aarch64-low.c (tdesc_aarch64): Declare.
(aarch64_arch_setup): Set the current process'es tdesc.
(target_regsets): Rename to ...
(aarch64_regsets): ... this.
(aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
(aarch64_regs_info): New function.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
globals.
(target_regsets): Rename to ...
(tile_regsets): ... this.
(tile_regsets_info, tile_usrregs_info, regs_info): New globals.
(tile_regs_info): New function.
(tile_arch_setup): Set the current process'es tdesc.
(the_low_target): Adjust.
(initialize_low_arch): New function.
* spu-low.c (tdesc_spu): Declare.
(spu_create_inferior, spu_attach): Set the new process'es tdesc.
* win32-arm-low.c (tdesc_arm): Declare.
(arm_arch_setup): New function.
(the_low_target): Install arm_arch_setup instead of
init_registers_arm.
* win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
(init_windows_x86): Rename to ...
(i386_arch_setup): ... this. Set `win32_tdesc'.
(the_low_target): Adjust.
* win32-low.c (win32_tdesc): New global.
(child_add_thread): Don't create the thread cache here.
(do_initial_child_stuff): Set the new process'es tdesc.
* win32-low.h (struct target_desc): Forward declare.
(win32_tdesc): Declare.
* lynx-i386-low.c (tdesc_i386): Declare global.
(lynx_i386_arch_setup): Set `lynx_tdesc'.
* lynx-low.c (lynx_tdesc): New global.
(lynx_add_process): Set the new process'es tdesc.
* lynx-low.h (struct target_desc): Forward declare.
(lynx_tdesc): Declare global.
* lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
(lynx_ppc_arch_setup): Set `lynx_tdesc'.
* nto-low.c (nto_tdesc): New global.
(do_attach): Set the new process'es tdesc.
* nto-low.h (struct target_desc): Forward declare.
(nto_tdesc): Declare.
* nto-x86-low.c (tdesc_i386): Declare.
(nto_x86_arch_setup): Set `nto_tdesc'.
gdb/
2013-06-07 Pedro Alves <palves@redhat.com>
* regformats/regdat.sh: Output #include tdesc.h. Make globals
static. Output a global target description pointer.
(init_registers_${name}): Adjust to initialize a
target description structure.
Will Newton [Fri, 7 Jun 2013 08:53:32 +0000 (08:53 +0000)]
gdb/testsuite/gdb.base/long_long.exp: Fix ARM EABI target
glob.
The current glob missed gnueabihf targets. Expand to catch these
cases and fix the test failure on those systems.
gdb/testsuite/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* gdb.base/long_long.exp: Fix ARM EABI target glob.
Will Newton [Fri, 7 Jun 2013 08:51:42 +0000 (08:51 +0000)]
gdb/testsuite/gdb.cp/annota2.exp: Add missing empty line
in output.
There should be an empty line between "post-prompt" and "starting".
This fixes a testsuite failure on ARM.
gdb/testsuite/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* gdb.cp/annota2.exp: Add empty line between "post-prompt"
and "starting".
Will Newton [Fri, 7 Jun 2013 08:47:09 +0000 (08:47 +0000)]
gdb/testsuite/gdb.cp: Fix tests for ARM C++ ABI.
The ARM C++ ABI defines constructors and destructors to return
pointers to this. The C++ tests that check the types of constructors
and destructors expect a return type of void. Conditionalize these
tests so they pass on ARM.
gdb/testsuite/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* gdb.cp/anon-struct.exp: Conditionalize constructor and
destructor prototypes for ARM ABI.
* gdb.cp/m-static.exp: Likewise.
Will Newton [Fri, 7 Jun 2013 07:49:10 +0000 (07:49 +0000)]
gdb/printcmd.c: Fix printing of Thumb minimal symbols.
In build_address_symbolic we call gdbarch_addr_bits_remove for
symbols in the symbol table but not for minimal symbols. This
causes a failure in gdb.cp/virtfunc.exp on ARM, as the address
of the virtual thunk is given an offset of 1 when in Thumb mode.
gdb/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* printcmd.c (build_address_symbolic): Call
gdbarch_addr_bits_remove for text minimal symbols.
Will Newton [Fri, 7 Jun 2013 07:44:20 +0000 (07:44 +0000)]
gdb/MAINTAINERS: Add myself to Write After Approval.
gdb/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* MAINTAINERS: Add myself to Write After Approval.
Yao Qi [Fri, 7 Jun 2013 00:33:25 +0000 (00:33 +0000)]
gdb/doc/
* gdb.texinfo (Symbols): Add kindex and cindex for
'maint print msymbols'.
Yao Qi [Fri, 7 Jun 2013 00:29:19 +0000 (00:29 +0000)]
gdb/testsuite/
* gdb.trace/mi-trace-unavailable.exp: New.
* gdb.trace/trace-unavailable.c: New.
Yao Qi [Fri, 7 Jun 2013 00:19:36 +0000 (00:19 +0000)]
gdb/
* tracepoint.c (start_tracing): Move code to ...
(trace_reset_local_state): ... here. New.
(disconnect_tracing): Don't call set_current_traceframe,
set_tracepoint_num, and set_traceframe_context. Call
trace_reset_local_state instead.
(tfile_close): Call trace_reset_local_state.
* ctf.c (ctf_close): Likewise.
* remote.c (remote_close): Likewise.
* tracepoint.h (trace_reset_local_state): Declare.
Alan Modra [Fri, 7 Jun 2013 00:00:05 +0000 (00:00 +0000)]
daily update
gdbadmin [Fri, 7 Jun 2013 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Doug Evans [Thu, 6 Jun 2013 23:51:09 +0000 (23:51 +0000)]
* dwarf2read.c: Whitespace fixes for DWP file format documentation,
and fix header docs.
Maciej W. Rozycki [Thu, 6 Jun 2013 22:09:07 +0000 (22:09 +0000)]
* mips.h (ELF_ST_SET_MIPS_PIC): Clear any STO_MIPS16 setting.
Doug Evans [Thu, 6 Jun 2013 19:02:27 +0000 (19:02 +0000)]
* gdb.cp/derivation.exp: Make tests have unique names.
Tom Tromey [Thu, 6 Jun 2013 19:00:13 +0000 (19:00 +0000)]
* gdb.base/dump.exp (capture_value): Don't put expression into
test name if arguments passed in.
Rename a couple more tests to make them unique.
Doug Evans [Thu, 6 Jun 2013 18:02:48 +0000 (18:02 +0000)]
Add PR number to this entry:
PR server/15594
* linux-x86-low.c (ps_get_thread_area): Properly extend address to
64 bits in 64-cross-32 environment.
Tom Tromey [Thu, 6 Jun 2013 15:50:37 +0000 (15:50 +0000)]
* gdb.base/break-always.exp: Explicitly specify test name.
Gary Benson [Thu, 6 Jun 2013 08:50:08 +0000 (08:50 +0000)]
Add missing PR to ChangeLog entry
Cary Coutant [Thu, 6 Jun 2013 06:06:56 +0000 (06:06 +0000)]
gold/
Add missing test case from last patch.
Joel Brobecker [Thu, 6 Jun 2013 05:16:06 +0000 (05:16 +0000)]
Replace "(tiny patch)" by "(tiny change)" in gdb ChangeLogs...
... as this is the wording recommended by the FSF via the manual
for Maintainers of GNU software.
Joel Brobecker [Thu, 6 Jun 2013 05:10:20 +0000 (05:10 +0000)]
Annotate last gdb.texinfo patch as accepted as a "tiny patch"
(copyright assignment not needed because patch is small enough to
not be legally significant).
Alan Modra [Thu, 6 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Thu, 6 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Cary Coutant [Wed, 5 Jun 2013 23:52:21 +0000 (23:52 +0000)]
2013-06-05 Alexander Ivchenko <alexander.ivchenko@intel.com>
gold/
* layout.cc (Layout::set_segment_offsets): Taking care of the case when
the maximum segment alignment is larger than the page size.
* testsuite/Makefile.am (large_symbol_alignment): Test that Gold
correctly aligns the symbols with large alignemnt.
* testsuite/Makefile.in: Regenerate.
* testsuite/large_symbol_alignment.cc: New file.
Doug Evans [Wed, 5 Jun 2013 22:28:51 +0000 (22:28 +0000)]
PR 15519
* cp-namespace.c (find_symbol_in_baseclass): Call
cp_lookup_symbol_in_namespace instead of cp_lookup_symbol_namespace.
Check result of call to lookup_symbol_static.
Call lookup_static_symbol_aux unconditionally.
Call check_typedef on base types before accessing them.
(cp_lookup_nested_symbol): Fix comment.
testsuite/
* gdb.cp/derivation2.cc: New file.
* gdb.cp/derivation.cc (main): Call foo2.
* gdb.cp/derivation.exp: Add tests for typedefs in another
file, and when there's an active block.
Luis Machado [Wed, 5 Jun 2013 20:43:53 +0000 (20:43 +0000)]
* gnu-v3-abi.c (gnuv3_skip_trampoline): Handle thunk
minimal symbols pointing to function descriptors.
Luis Machado [Wed, 5 Jun 2013 20:38:37 +0000 (20:38 +0000)]
* gdb.cp/virtfunc.exp (make_one_vtable_result): Handle extra output
from targets that use function descriptors in the virtual tables.
Handle presence of dot symbols.
Tom Tromey [Wed, 5 Jun 2013 17:32:51 +0000 (17:32 +0000)]
* python/py-utils.c (gdb_pymodule_addobject): Cast away const.
Marc Khouzam [Wed, 5 Jun 2013 14:11:47 +0000 (14:11 +0000)]
2013-06-05 Simon Marchi <simon.marchi@ericsson.com>
* gdb.texinfo (Miscellaneous gdb/mi Commands): Fix -add-inferior
response field name (thread-group to inferior).
Mike Frysinger [Wed, 5 Jun 2013 01:42:13 +0000 (01:42 +0000)]
sim: use AM_MAINTAINER_MODE
I noticed the sim code is using an old implementation of the maintainer logic.
I cut it over to the new macro (like gdb has been doing). In practice, it
makes no difference currently as nothing in the sim tree uses it, but I have a
follow up commit for the Blackfin tree that needs it.
gdbadmin [Wed, 5 Jun 2013 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 5 Jun 2013 00:00:05 +0000 (00:00 +0000)]
daily update
Roland McGrath [Tue, 4 Jun 2013 19:24:10 +0000 (19:24 +0000)]
ld/testsuite/
* ld-size/size.exp: For *-*-nacl* targets, use options_regsub(ld)
to massage -m arguments into _nacl variants.
* ld/testsuite/ld-size/size32-1-i386.d: Loosen regexps so they
don't care what the exact addresses are.
* ld/testsuite/ld-size/size32-1-x32.d: Likewise.
* ld/testsuite/ld-size/size32-1-x86-64.d: Likewise.
* ld/testsuite/ld-size/size32-2-i386.d: Likewise.
* ld/testsuite/ld-size/size32-2-x32.d: Likewise.
* ld/testsuite/ld-size/size32-2-x86-64.d: Likewise.
* ld/testsuite/ld-size/size64-1-x32.d: Likewise.
* ld/testsuite/ld-size/size64-1-x86-64.d: Likewise.
* ld/testsuite/ld-size/size64-2-x32.d: Likewise.
* ld/testsuite/ld-size/size64-2-x86-64.d: Likewise.
H.J. Lu [Tue, 4 Jun 2013 16:08:51 +0000 (16:08 +0000)]
Update x86 nacl tests for section alignment change
* ld-i386/tlsbindesc-nacl.rd: Updated for text/data/bss section
alignment change.
* ld-x86-64/split-by-file-nacl.rd: Likewise.
Sergio Durigan Junior [Tue, 4 Jun 2013 15:13:33 +0000 (15:13 +0000)]
Fixing ChangeLog entry of the last commit.
Sergio Durigan Junior [Tue, 4 Jun 2013 15:12:52 +0000 (15:12 +0000)]
GDB was not restoring the signal handler before returning when a notification
was received. This patch fixes it.
2013-06-04 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
* remote.c (remote_wait_as): Restore signal handler before returning
when GDB gets a notification.
Gary Benson [Tue, 4 Jun 2013 13:31:00 +0000 (13:31 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* gdb.base/break-probes.exp: New file.
* gdb.base/break-probes.c: Likewise.
* gdb.base/break-probes-solib.c: Likewise.
* gdb.base/info-shared.exp: New file.
* gdb.base/info-shared.c: Likewise.
* gdb.base/info-shared-solib1.c: Likewise.
* gdb.base/info-shared-solib2.c: Likewise.
Gary Benson [Tue, 4 Jun 2013 13:23:32 +0000 (13:23 +0000)]
2013-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
Gary Benson <gbenson@redhat.com>
* lib/gdb.exp (build_executable_from_specs): Use gdb_compile_pthread,
gdb_compile_shlib or gdb_compile_shlib_pthreads where appropriate.
* lib/prelink-support.exp (build_executable_own_libs): Allow INTERP
to be set to "no" to indicate that no ld.so copy should be made.
* gdb.base/break-interp.exp (solib_bp): New constant.
(reach_1): Use the above instead of "_dl_debug_state".
(test_attach): Likewise.
(test_ld): Likewise.
* gdb.threads/dlopen-libpthread.exp: New file.
* gdb.threads/dlopen-libpthread.c: Likewise.
* gdb.threads/dlopen-libpthread-lib.c: Likewise.
* gdb.base/solib-corrupted.exp: Disable test if GDB is using probes.
Gary Benson [Tue, 4 Jun 2013 13:17:06 +0000 (13:17 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* breakpoint.h (handle_solib_event): Moved function declaration
to solib.h.
* breakpoint.c (handle_solib_event): Moved function to solib.c.
(bpstat_stop_status): Pass new argument to handle_solib_event.
* solib.h (update_solib_breakpoints): New function declaration.
(handle_solib_event): Moved function declaration from
breakpoint.h.
* solib.c (update_solib_breakpoints): New function.
(handle_solib_event): Moved function from breakpoint.c.
Updated to call solib_ops->handle_event if not NULL.
* solist.h (target_so_ops): New fields "update_breakpoints" and
"handle_event".
* infrun.c (set_stop_on_solib_events): New function.
(_initialize_infrun): Use the above for "set
stop-on-solib-events".
(handle_inferior_event): Pass new argument to handle_solib_event.
* solib-svr4.c (probe.h): New include.
(svr4_free_library_list): New forward declaration.
(probe_action): New enum.
(probe_info): New struct.
(probe_info): New static variable.
(NUM_PROBES): New definition.
(svr4_info): New fields "using_xfer", "probes_table" and
"solib_list".
(free_probes_table): New function.
(free_solib_list): New function.
(svr4_pspace_data_cleanup): Free probes table and solib list.
(svr4_copy_library_list): New function.
(svr4_current_sos_via_xfer_libraries): New parameter "annex".
(svr4_read_so_list): New parameter "prev_lm".
(svr4_current_sos_direct): Renamed from "svr4_current_sos".
(svr4_current_sos): New function.
(probe_and_action): New struct.
(hash_probe_and_action): New function.
(equal_probe_and_action): Likewise.
(register_solib_event_probe): Likewise.
(solib_event_probe_at): Likewise.
(solib_event_probe_action): Likewise.
(solist_update_full): Likewise.
(solist_update_incremental): Likewise.
(disable_probes_interface_cleanup): Likewise.
(svr4_handle_solib_event): Likewise.
(svr4_update_solib_event_breakpoint): Likewise.
(svr4_update_solib_event_breakpoints): Likewise.
(svr4_create_solib_event_breakpoints): Likewise.
(enable_break): Free probes table before creating breakpoints.
Use svr4_create_solib_event_breakpoints to create breakpoints.
(svr4_solib_create_inferior_hook): Free the solib list.
(_initialize_svr4_solib): Initialise
svr4_so_ops.handle_solib_event and svr4_so_ops.update_breakpoints.
Gary Benson [Tue, 4 Jun 2013 13:10:53 +0000 (13:10 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* target.h (target_ops): New field
"to_augmented_libraries_svr4_read".
(target_augmented_libraries_svr4_read): New macro.
* target.c (update_current_target): Handle
to_augmented_libraries_svr4_read.
* remote.c (remote_state): New field
"augmented_libraries_svr4_read".
(remote_augmented_libraries_svr4_read_feature): New function.
(remote_protocol_features): Add entry for
"augmented-libraries-svr4-read".
(remote_augmented_libraries_svr4_read): New function.
(init_remote_ops): Initialize
remote_ops.to_augmented_libraries_svr4_read.
Gary Benson [Tue, 4 Jun 2013 13:07:45 +0000 (13:07 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* gdb.texinfo (General Query Packets/qSupported): Added
"qXfer:libraries-svr4:read" and "augmented-libraries-svr4-read".
to the table of currently defined stub features.
Added a more detailed entry for "augmented-libraries-svr4-read".
(General Query Packets/qXfer:libraries-svr4:read): Documented
the augmented form of this packet.
Gary Benson [Tue, 4 Jun 2013 13:02:15 +0000 (13:02 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* NEWS: Update.
Gary Benson [Tue, 4 Jun 2013 12:59:21 +0000 (12:59 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* server.c (handle_query): Add "augmented-libraries-svr4-read+"
to qSupported response when appropriate.
(handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
with nonzero-length annex.
* linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
arguments supplied in annex.
Gary Benson [Tue, 4 Jun 2013 12:53:34 +0000 (12:53 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* objfiles.h (inhibit_section_map_updates): New function
declaration.
(resume_section_map_updates): Likewise.
(resume_section_map_updates_cleanup): Likewise.
* objfiles.c (objfile_pspace_info): Removed field
"objfiles_changed_p". New fields "new_objfiles_available",
"section_map_dirty" and "inhibit_updates".
(allocate_objfile): Set new_objfiles_available.
(free_objfile): Set section_map_dirty.
(objfile_relocate1): Likewise.
(in_plt_section): Likewise.
(find_pc_section): Update the conditions under which the
section map will be updated.
(inhibit_section_map_updates): New function.
(resume_section_map_updates): Likewise.
(resume_section_map_updates_cleanup): Likewise.
Gary Benson [Tue, 4 Jun 2013 12:50:21 +0000 (12:50 +0000)]
2013-06-04 Gary Benson <gbenson@redhat.com>
* probe.h (get_probe_argument_count): New declaration.
(evaluate_probe_argument): Likewise.
* probe.c (get_probe_argument_count): New function.
(evaluate_probe_argument): Likewise.
(probe_safe_evaluate_at_pc): Use the above new functions.
Alan Modra [Tue, 4 Jun 2013 02:44:35 +0000 (02:44 +0000)]
* ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
* rs6000-tdep.c (read_insn): Add frame param, don't assume big-endian.
(ppc_insns_match_pattern): Add frame param. Avoid multiple
target mem reads on optional insns.
* ppc-linux-tdep.c (ppc_skip_trampoline_code): Update
ppc_insns_match_pattern calls.
* ppc64-tdep.c (ppc64_standard_linkage2, ppc64_standard_linkage3):
Add match for power7 thread safety insns, and new order of
std 2,40(1) insn. Correct code shown for _dl_runtime_resolve
invocation in comment, and update rest of comment.
(PPC64_STANDARD_LINKAGE1_LEN, PPC64_STANDARD_LINKAGE2_LEN,
PPC64_STANDARD_LINKAGE3_LEN): Delete.
(ppc64_standard_linkage2_target): Update insn offsets.
(ppc64_skip_trampoline_code): Use a single insn buffer. Match newer
stubs first. Update calls.
Yao Qi [Tue, 4 Jun 2013 01:33:31 +0000 (01:33 +0000)]
gdb/
* solib.c (solib_find): Don't need dir separator if path has
drive spec.
gdbadmin [Tue, 4 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 4 Jun 2013 00:00:05 +0000 (00:00 +0000)]
daily update
Joel Brobecker [Mon, 3 Jun 2013 13:22:29 +0000 (13:22 +0000)]
Revert "fix cleanup handling in macho_symfile_read"
This patch indirectly causes a SEGV by creating a dangling pointer.
Reverting this patch while working on a clearer memory management
method for this part of the code.
gdb/Changelog:
Revert:
* machoread.c (macho_symfile_read): Assign first cleanup to
'back_to'.
Alan Modra [Mon, 3 Jun 2013 04:11:09 +0000 (04:11 +0000)]
* syms.c (_bfd_stab_section_find_nearest_line): Add last_str
var. Use it with last_stab.
Yao Qi [Mon, 3 Jun 2013 03:16:24 +0000 (03:16 +0000)]
gdb/
* mi/mi-cmd-var.c (mi_no_values, mi_simple_values): Move to
mi-parse.c. Make them static.
(mi_all_values): Likewise.
(mi_parse_values_option): Move to mi-parse.c. Rename it to
mi_parse_print_values. Make it external.
* mi/mi-cmds.h (mi_no_values, mi_simple_values, mi_all_values):
Remove the declarations.
* mi/mi-parse.c (mi_parse_print_values): Moved from mi-cmd-var.c.
* mi/mi-parse.h (mi_parse_print_values): Declare.
* mi/mi-cmd-stack.c: Include mi-parse.h.
(parse_print_values): Remove
(mi_cmd_stack_list_locals): Call mi_parse_print_values instead
of parse_print_values.
(mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Likewise.
Alan Modra [Mon, 3 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Mon, 3 Jun 2013 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
gdbadmin [Sun, 2 Jun 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 2 Jun 2013 00:00:05 +0000 (00:00 +0000)]
daily update
Denis Chertykov [Sat, 1 Jun 2013 07:14:44 +0000 (07:14 +0000)]
* gas/config/tc-avr.c: Change ISA for devices with USB support to
AVR_ISA_XMEGAU
* include/opcode/avr.h: Rename AVR_ISA_XCH to AVR_ISA_RMW. Remove
from AVR_ISA_XMEGA and add new AVR_ISA_XMEGAU
DJ Delorie [Sat, 1 Jun 2013 01:01:44 +0000 (01:01 +0000)]
merge from gcc
Alan Modra [Sat, 1 Jun 2013 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Sat, 1 Jun 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Doug Evans [Fri, 31 May 2013 19:14:33 +0000 (19:14 +0000)]
* linux-x86-low.c (ps_get_thread_area): Properly extend address to
64 bits in 64-cross-32 environment.
H.J. Lu [Fri, 31 May 2013 17:27:28 +0000 (17:27 +0000)]
Don't align text/data/bss sections for ELF
binutils/testsuite/
* binutils-all/i386/compressed-1b.d: Updated for text/data/bss
section alignment change.
* binutils-all/i386/compressed-1c.d: Likewise.
* binutils-all/x86-64/compressed-1b.d: Likewise.
* binutils-all/x86-64/compressed-1c.d: Likewise.
gas/
* config/tc-i386.c (md_begin): Don't align text/data/bss sections
for ELF.
gas/testsuite/
* gas/i386/size-3.d: Updated for text/data/bss section alignment
change.
* gas/i386/x86-64-size-1.d: Likewise.
* gas/i386/x86-64-unwind.d: Likewise.
* gas/i386/ilp32/x86-64-size-1.d: Likewise.
* gas/i386/ilp32/x86-64-size-5.d: Likewise.
* gas/i386/ilp32/x86-64-unwind.d: Likewise.
ld/testsuite/
* ld-i386/pr12718.d: Updated for text/data/bss section alignment
change.
* ld-i386/tlsbindesc.dd: Likewise.
* ld-i386/tlsbindesc.rd: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlspic.dd: Likewise.
* ld-x86-64/ilp32-4.d: Likewise.
* ld-x86-64/pr12718.d: Likewise.
* ld-x86-64/split-by-file.rd: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlsbin.rd: Likewise.
* ld-x86-64/tlsbindesc.dd: Likewise.
* ld-x86-64/tlsbindesc.rd: Likewise.
* ld-x86-64/tlsdesc.dd: Likewise.
* ld-x86-64/tlsdesc.rd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlspic.rd: Likewise.
Catherine Moore [Fri, 31 May 2013 17:04:53 +0000 (17:04 +0000)]
2013-05-31 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-mips.c (s_ehword): New.
2013-05-31 Catherine Moore <clm@codesourcery.com>
gas/testsuite/
* gas/mips/ehword.d: New.
* gas/mips/ehword.s: New.
* gas/mips/mips.exp: Run ehword test.
Yao Qi [Fri, 31 May 2013 10:06:02 +0000 (10:06 +0000)]
gdb/
* tracepoint.c (all_tracepoint_actions_and_cleanup): Declare.
(encode_actions): Move code to ...
(all_tracepoint_actions_and_cleanup): ... here. New.
(trace_dump_command): Likewise.
gdbadmin [Fri, 31 May 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 31 May 2013 00:00:04 +0000 (00:00 +0000)]
daily update
Cary Coutant [Thu, 30 May 2013 23:01:11 +0000 (23:01 +0000)]
2013-05-30 Alexander Ivchenko <alexander.ivchenko@intel.com>
Sriraman Tallam <tmsriram@google.com>
* options.h (sort_section): New option.
* output.h (Input_section_sort_section_prefix_special_ordering_compare):
Rename from Input_section_sort_section_name_special_ordering_compare.
(Input_section_sort_section_name_compare): New struct.
* output.cc (Output_section::Input_section_sort_section_name_compare::
operator()): New function.
(Output_section::sort_attached_input_sections): Use new sort function
for .text if --sort-section=name is specified.
* layout.cc (Layout::make_output_section):
Add sorting by name when --sort-section=name is specified.
* testsuite/Makefile.am (text_section_grouping): Test option
--sort-section=name.
* testsuite/Makefile.in: Regenerate.
* testsuite/section_sorting_name.cc: New file.
* testsuite/section_sorting_name.sh: New file.
Catherine Moore [Thu, 30 May 2013 20:27:21 +0000 (20:27 +0000)]
2013-05-30 Paul Brook <paul@codesourcery.com>
bfd/
* bfd-in2.h: Regenerate.
* elf32-mips.c (elf_mips_eh_howto): New.
(bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
(bfd_elf32_bfd_reloc_name_lookup): Likewise.
(mips_elf32_rtype_to_howto): Support R_MIPS_EH.
* elf64-mips.c (elf_mips_eh_howto): New.
(bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
(bfd_elf64_bfd_reloc_name_lookup): Likewise.
(mips_elf64_rtype_to_howto): Support R_MIPS_EH.
* libbfd.h: Regenerate.
* reloc.c (BFD_RELOC_MIPS_EH): New.
gas/
* config/tc-mips.c (md_apply_fix): Support BFD_RELOC_MIPS_EH.
include/elf
* mips.h (R_MIPS_EH): New.
Tom Tromey [Thu, 30 May 2013 17:44:54 +0000 (17:44 +0000)]
maintenance_expand_symtabs leaks a cleanup
It turns out that maintenance_expand_symtabs was missing a call to
do_cleanups. I found this using the cleanup checker.
* symmisc.c (maintenance_expand_symtabs): Call do_cleanups.
Tom Tromey [Thu, 30 May 2013 17:41:38 +0000 (17:41 +0000)]
fix up xml-support.c
xml-support.c has a function that returns a cleanup via an out parameter.
This changes this function to be a normal cleanup constructor --
returning the cleanup directly and returning the other result via an
out parameter.
This is sort of a hack, but it lets the checker work here.
I also noticed that gdb_xml_create_parser_and_cleanup does not need to
be exported any more.
* xml-support.c (gdb_xml_create_parser_and_cleanup): Rename from
gdb_xml_create_parser_and_cleanup_1. Return a cleanup. Remove
'old_chain' argument. Add 'parser_result' argument.
(gdb_xml_create_parser_and_cleanup): Remove old version.
(gdb_xml_parse_quick): Update.
(xml_process_xincludes): Update.
* xml-support.h (gdb_xml_create_parser_and_cleanup): Don't
declare.
Tom Tromey [Thu, 30 May 2013 17:39:34 +0000 (17:39 +0000)]
fix compile_rx_or_error
compile_rx_or_error looks like a constructor, but it can return NULL.
This patch changes it to remove the NULL return, making it work
like any other cleanup constructor.
This is a stylistic patch but I think it is also better for code to
follow the normal conventions.
* probe.c (collect_probes): Check arguments for NULL before
calling compile_rx_or_error.
* utils.c (compile_rx_or_error): Require 'rx' to be non-NULL.
Remove NULL return.
Tom Tromey [Thu, 30 May 2013 17:37:50 +0000 (17:37 +0000)]
some fixes to infrun.c
This fixes some of the problems in infrun.c that the checker reported.
I filed the remaining problems as bugs.
This patch is purely stylistic.
* infrun.c (adjust_pc_after_break): Introduce an outer null
cleanup.
Tom Tromey [Thu, 30 May 2013 17:37:12 +0000 (17:37 +0000)]
fix mi-cmd-var.c
This is a stylistic change in mi-cmd-var.c that adds outer cleanups
where needed by the checker.
* mi/mi-cmd-var.c (varobj_update_one): Add an outer null cleanup.
Tom Tromey [Thu, 30 May 2013 17:36:29 +0000 (17:36 +0000)]
fix cli-script.c
read_command_lines_1 had some (IMNSHO) spaghetti-ish code for cleanup
handling. This makes the code much simpler to understand, by
introducing an outer cleanup.
This is another case where a stylistic change for the checker is also
nice for the reader.
* cli/cli-script.c (read_command_lines_1): Use a null cleanup
for 'old_chain'. Do not check 'head' before processing
cleanups.
Tom Tromey [Thu, 30 May 2013 17:35:40 +0000 (17:35 +0000)]
fix mi-cmd-stack.c
mi-cmd-stack.d had a conditional cleanup, "cleanup_tuple" that
confused the checker. However, there was no need for this, since it
was only used via do_cleanups at the end of the function, just before
another call to do_cleanups.
So, while this is a stylistic patch for the checker, I also consider
it a generic improvement for readers of the code.
* mi/mi-cmd-stack.c (list_arg_or_local): Remove
"cleanup_tuple".
Tom Tromey [Thu, 30 May 2013 17:34:18 +0000 (17:34 +0000)]
fix dbxread.c
This is a stylistic change to make some code in dbxread.c analyzable
by the checker.
* dbxread.c (dbx_read_symtab): Declare 'back_to' in a more
inner scope. Unconditionally call do_cleanups.
Tom Tromey [Thu, 30 May 2013 17:33:41 +0000 (17:33 +0000)]
fix source.c
find_and_open_source can leak a cleanup.
* source.c (find_and_open_source): Call do_cleanups.
Tom Tromey [Thu, 30 May 2013 17:31:48 +0000 (17:31 +0000)]
fix linux-thread-db.c
This is a stylistic change to make it so the checker can analyze a
function in linux-thread-db.c.
* linux-thread-db.c (thread_db_load_search): Unconditionally
call do_cleanups.