summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* x32: Fix gdb.trace/mi-trace-frame-collected.expPedro Alves2016-08-192-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb.trace/mi-trace-frame-collected.exp has a couple failures on x32: FAIL: gdb.trace/mi-trace-frame-collected.exp: live: -trace-frame-collected (register) FAIL: gdb.trace/mi-trace-frame-collected.exp: tfile: -trace-frame-collected (register) gdb.log: -trace-frame-collected ^done,explicit-variables=[{name="gdb_char_test",value="0 '\\000'"}],computed-expressions=[],registers=[{number="16",value="0x4004dc"},{number="204",value="0x4004dc"}],tvars =[],memory=[{address="0x00601060",length="1"}] (gdb) FAIL: gdb.trace/mi-trace-frame-collected.exp: live: -trace-frame-collected (register) [...] -trace-frame-collected ^done,explicit-variables=[{name="gdb_char_test",value="0 '\\000'"}],computed-expressions=[],registers=[{number="16",value="0x4004dc"},{number="204",value="0x4004dc"}],tvars =[],memory=[{address="0x00601060",length="1"}] (gdb) FAIL: gdb.trace/mi-trace-frame-collected.exp: tfile: -trace-frame-collected (register) This test only collects the PC, and thus expects to only see one register in the output of -trace-frame-collected. However, while on the 64-bit ABI gdb only exposes 64-bit $pc/$rip (register 16 above), on x32, GDB exposes 32-bit $eip as well, as a pseudo-register (register 204 above). Thus, collecting $pc/$rip automatically always collects $eip as well. gdb/testsuite/ChangeLog: 2016-08-19 Pedro Alves <palves@redhat.com> * gdb.trace/mi-trace-frame-collected.exp (test_trace_frame_collected): On x32, expect two registers.
* x32: gdb: Fix 'call' insn relocation with qRelocInsnPedro Alves2016-08-192-5/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the fast tracepoints tests against x32 gdbserver exposes a latent bug. E.g.,: (gdb) continue Continuing. Reading /media/sf_host-pedro/gdb/mygit/build-ubuntu-x32/gdb/testsuite/outputs/gdb.trace/change-loc/change-loc-2.sl from remote target... Thread 1 "change-loc" received signal SIGSEGV, Segmentation fault. func4 () at /home/pedro/gdb/src/gdb/testsuite/gdb.trace/change-loc.h:24 24 } (gdb) FAIL: gdb.trace/change-loc.exp: 1 ftrace: continue to marker 2 The test sets a fast tracepoint on a shared library. On x32, shared libraries end up loaded somewhere in the upper 2GB of the 4GB address space x32 has access to. When gdbserver needs to copy an instruction to execute it in the jump pad, it asks gdb to relocate/adjust it, with the qRelocInsn packet. gdb converts "call" instructions into a "push $<2GB-4GB addr> + jmp" sequence, however, the "pushq" instruction sign extends its operand, so later when the called function returns, it returns to an incorrectly sign-extended address. E.g., 0xfffffffffabc0000 instead of 0xfabc0000, resulting in the segmentation fault. Fix this by converting calls at such addresses to "sub + mov + jmp" sequences instead. gdb/ChangeLog: 2016-08-19 Pedro Alves <palves@redhat.com> * amd64-tdep.c (amd64_relocate_instruction) <callq>: Handle return addresses over 0x7fffffff.
* x32: gdbserver's agent bytecode JIT: fix "call" emissionPedro Alves2016-08-192-0/+6
| | | | | | | | | | | | | | | | | | | Running fast tracepoint tests on x32 exposes a latent bug in the agent bytecode jitting. There's a code path that forgets to emit the call opcode... Whoops. Fixes a bunch of gdb.trace/trace-condition.exp FAILs, like: (gdb) continue Continuing. Thread 1 "trace-condition" received signal SIGSEGV, Segmentation fault. 0x7ffec016 in ?? () (gdb) FAIL: gdb.trace/trace-condition.exp: ftrace: $rip == *set_point: advance through tracing gdb/gdbserver/ChangeLog: 2016-08-19 Pedro Alves <palves@redhat.com> * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
* x32: Avoid unsigned long when installing fast tracepoint jump padsPedro Alves2016-08-192-3/+8
| | | | | | | | | | | | | | | We're casting through unsigned long to write a 64-bit immediate operand of movabs (the comment said movl, but that was incorrect). The problem is that unsigned long is 32-bit on x32, so we were writing fewer bytes than necessary. Fix this by using an 8 byte memcpy like in other similar places in the function. gdb/gdbserver/ChangeLog: 2016-08-19 Pedro Alves <palves@redhat.com> * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix comment. Use memcpy instead of casting through unsigned long.
* x32 Fast tracepoints: Customize jump pad addressPedro Alves2016-08-192-4/+53
| | | | | | | | | | | | MAP_32BIT is ignored on x32, meaning the jump pad can end up somewhere between 2GB and 4GB, too far away from the executable for 5-byte relative jumps (JMP rel32). So on x32, try explicitly placing the jump pad near the middle of the available address space. gdb/gdbserver/ChangeLog: 2016-08-19 Pedro Alves <palves@redhat.com> * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try allocating around 0x80000000.
* x32 Fast tracepoints: IPA target descriptionsPedro Alves2016-08-196-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building GDB for x32 fails building the IPA, with: .../src/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’: .../src/gdb/gdbserver/linux-amd64-ipa.c:182:14: error: ‘tdesc_amd64_avx_linux’ was not declared in this scope return tdesc_amd64_avx_linux; ^ .../src/gdb/gdbserver/linux-amd64-ipa.c:184:14: error: ‘tdesc_amd64_mpx_linux’ was not declared in this scope return tdesc_amd64_mpx_linux; ^ .../src/gdb/gdbserver/linux-amd64-ipa.c:186:14: error: ‘tdesc_amd64_avx_mpx_linux’ was not declared in this scope return tdesc_amd64_avx_mpx_linux; ^ [...] The problem is that the IPA is trying to use the 64-bit descriptions, when it should be using the x32 ones. gdb/gdbserver/ChangeLog: 2016-08-19 Pedro Alves <palves@redhat.com> PR gdb/20415 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o) (x32-avx512-linux-ipa.o): New rules. * configure.ac (x86_64-*-linux*): New x32 check. * configure.srv (ipa_x32_linux_regobj): New. (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32. * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32 descriptions. (initialize_low_tracepoint) [__ILP32__]: Initialize x32 descriptions. * configure: Regenerate.
* Enable relro by default for AArch64, ARM and SCORE.Nick Clifton2016-08-195-0/+10
| | | | | | | | ld * emultempl/aarch64elf.em (before_parse): Initialise the relro field in the link_info structure. * emultempl/armelf.em (before_parse): Likewise. * emultempl/linux.em (before_parse): Likewise. * emultempl/scoreelf.em (before_parse): Likewise.
* Place .shstrtab section after .symtab and .strtab, thus restoring ↵Nick Clifton2016-08-19129-286/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | monotonically increasing section offsets. bfd * elf.c (assign_section_numbers): Assign number for the .shstrtab section after the symbol table and string table sections. binutils * testsuite/binutils-all/readelf.s: Adjust expected ordering of sections. * testsuite/binutils-all/readelf.s-64: Likewise. gas * testsuite/gas/i386/ilp32/x86-64-unwind.d: Adjust expected ordering of sections. * testsuite/gas/i386/x86-64-unwind.d: Likewise. * testsuite/gas/ia64/alias-ilp32.d: Likewise. * testsuite/gas/ia64/alias.d: Likewise. * testsuite/gas/ia64/group-1.d: Likewise. * testsuite/gas/ia64/group-2.d: Likewise. * testsuite/gas/ia64/secname-ilp32.d: Likewise. * testsuite/gas/ia64/secname.d: Likewise. * testsuite/gas/ia64/unwind-ilp32.d: Likewise. * testsuite/gas/ia64/unwind.d: Likewise. * testsuite/gas/ia64/xdata-ilp32.d: Likewise. * testsuite/gas/ia64/xdata.d: Likewise. * testsuite/gas/mmix/bspec-1.d: Likewise. * testsuite/gas/mmix/bspec-2.d: Likewise. * testsuite/gas/mmix/byte-1.d: Likewise. * testsuite/gas/mmix/loc-1.d: Likewise. * testsuite/gas/mmix/loc-2.d: Likewise. * testsuite/gas/mmix/loc-3.d: Likewise. * testsuite/gas/mmix/loc-4.d: Likewise. * testsuite/gas/mmix/loc-5.d: Likewise. * testsuite/gas/tic6x/scomm-directive-4.d: Likewise. ld * testsuite/ld-alpha/tlsbin.rd: Adjust expected ordering of sections. * testsuite/ld-alpha/tlsbinr.rd: Likewise. * testsuite/ld-alpha/tlspic.rd: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-i386/nogot1.d: Likewise. * testsuite/ld-i386/pr12718.d: Likewise. * testsuite/ld-i386/pr12921.d: Likewise. * testsuite/ld-i386/tlsbin-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin.rd: Likewise. * testsuite/ld-i386/tlsbin2-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin2.rd: Likewise. * testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsbindesc.rd: Likewise. * testsuite/ld-i386/tlsdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsdesc.rd: Likewise. * testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsgdesc.rd: Likewise. * testsuite/ld-i386/tlsnopic-nacl.rd: Likewise. * testsuite/ld-i386/tlsnopic.rd: Likewise. * testsuite/ld-i386/tlspic-nacl.rd: Likewise. * testsuite/ld-i386/tlspic.rd: Likewise. * testsuite/ld-i386/tlspic2-nacl.rd: Likewise. * testsuite/ld-i386/tlspic2.rd: Likewise. * testsuite/ld-ia64/tlsbin.rd: Likewise. * testsuite/ld-ia64/tlspic.rd: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-50.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-60.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-70.d: Likewise. * testsuite/ld-mmix/bspec1.d: Likewise. * testsuite/ld-mmix/bspec2.d: Likewise. * testsuite/ld-mmix/local1.d: Likewise. * testsuite/ld-mmix/local3.d: Likewise. * testsuite/ld-mmix/local5.d: Likewise. * testsuite/ld-mmix/local7.d: Likewise. * testsuite/ld-mmix/undef-3.d: Likewise. * testsuite/ld-powerpc/tlsexe.r: Likewise. * testsuite/ld-powerpc/tlsexe32.r: Likewise. * testsuite/ld-powerpc/tlsexetoc.r: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. * testsuite/ld-powerpc/tlstocso.r: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-sh/sh64/crange1.rd: Likewise. * testsuite/ld-sh/sh64/crange2.rd: Likewise. * testsuite/ld-sh/sh64/crange3-cmpct.rd: Likewise. * testsuite/ld-sh/sh64/crange3-media.rd: Likewise. * testsuite/ld-sh/sh64/crange3.rd: Likewise. * testsuite/ld-sh/sh64/crangerel1.rd: Likewise. * testsuite/ld-sh/sh64/crangerel2.rd: Likewise. * testsuite/ld-sh/tlsbin-2.d: Likewise. * testsuite/ld-sh/tlspic-2.d: Likewise. * testsuite/ld-sparc/gotop32.rd: Likewise. * testsuite/ld-sparc/gotop64.rd: Likewise. * testsuite/ld-sparc/tlssunbin32.rd: Likewise. * testsuite/ld-sparc/tlssunbin64.rd: Likewise. * testsuite/ld-sparc/tlssunnopic32.rd: Likewise. * testsuite/ld-sparc/tlssunnopic64.rd: Likewise. * testsuite/ld-sparc/tlssunpic32.rd: Likewise. * testsuite/ld-sparc/tlssunpic64.rd: Likewise. * testsuite/ld-tic6x/common.d: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/ilp32-4.d: Likewise. * testsuite/ld-x86-64/nogot1.d: Likewise. * testsuite/ld-x86-64/pr12718.d: Likewise. * testsuite/ld-x86-64/pr12921.d: Likewise. * testsuite/ld-x86-64/split-by-file-nacl.rd: Likewise. * testsuite/ld-x86-64/split-by-file.rd: Likewise. * testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin.rd: Likewise. * testsuite/ld-x86-64/tlsbin2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin2.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. * testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsdesc.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc.rd: Likewise. * testsuite/ld-x86-64/tlspic-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic.rd: Likewise. * testsuite/ld-x86-64/tlspic2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic2.rd: Likewise. * testsuite/ld-xtensa/tlsbin.rd: Likewise. * testsuite/ld-xtensa/tlspic.rd: Likewise.
* PowerPC64, Don't copy weak symbol dyn_relocs to weakdef.Alan Modra2016-08-192-31/+77
| | | | | | | | | | | | | | At the cost of an extra field in the symbol table hash entries, this simplification to the relocate_section dynamic reloc test should help maintainability. * elf64-ppc.c (struct ppc_link_hash_entry): Add weakref. (ppc64_elf_copy_indirect_symbol): Set weakref. Don't merge dyn_relocs for weakdefs. (alias_readonly_dynrelocs): New function. (ppc64_elf_adjust_dynamic_symbol): Use alias_readonly_dynrelocs. (ppc64_elf_relocate_section): Simplify condition under which dyn_relocs are emitted.
* PR 20472, PowerPC64 ifunc confusionAlan Modra2016-08-192-65/+111
| | | | | | | | | | | | | | | | | | | | | This patch fixes quite a lot of confusion in allocate_dynrelocs over ifuncs. Function descriptors make ELFv1 quite different to ELFv2. PR 20472 * elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test. (readonly_dynrelocs): Comment fix. (global_entry_stub): New function. (ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test. Match ELFv2 code deciding on dynamic relocs vs. global entry stubs to that in size_global_entry_stubs, handling ifunc too. Delete dead weak sym code. (allocate_dynrelocs): Ensure dyn_relocs field is cleared when no dyn_relocs are needed. Correct handling of ifunc dyn_relocs. Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for undefweak syms. Expand and correct comments. (size_global_entry_stubs): Ensure symbol is defined. (ppc64_elf_relocate_section): Match condition under which dyn_relocs are emitted to that in allocate_dynrelocs.
* Automatic date update in version.inGDB Administrator2016-08-191-1/+1
|
* Add ChangeLog updates to my previous two commitsCarl E. Love2016-08-182-0/+10
| | | | | | | | | | | | gdb/ChangeLog: * MAINTAINERS (Write After Approval): Add "Carl Love". gdb/testsuite/ChangeLog: * gdb.arch/powerpc-power.s: Add new Power9 instruction tests and sync up the test with tests in gas/testsuite/gas/ppc. * gdb.arch/powerpc-power.exp: Likewise.
* Fix for powerpc-power.exp gdb regression test for Power 9Carl Love2016-08-182-505/+2717
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The GDB testsuite reports 5 test failures on Power 7 instructions. Additionally the ppc test is missing the new Power 9 instructions as well as a large number of older instructions. Additionally, some instruction names have changed or been deleted. This patch fixes the test failures and completely updates the test to make it consistent with the supported Power 9 instructions listed in: gas/testsuite/gas/ppc/power7.d gas/testsuite/gas/ppc/power8.d gas/testsuite/gas/ppc/power9.d gas/testsuite/gas/ppc/altivec.d gas/testsuite/gas/ppc/altivec2.d gas/testsuite/gas/ppc/altivec3.d gas/testsuite/gas/ppc/vsx.d gas/testsuite/gas/ppc/vsx2.d gas/testsuite/gas/ppc/vsx3.d ----------------------------------------------------- gdb/testsuite/ChangeLog 2016-08-18 Carl Love <cel@us.ibm.com> * gdb.arch/powerpc-power.s: Add new Power9 instruction tests and sync up the test with tests in gas/testsuite/gas/ppc. * gdb.arch/powerpc-power.exp: Likewise.
* Add myself as write-after-approval GDB maintainer.Carl E. Love2016-08-181-0/+1
| | | | | | gdb/ChangeLog: * MAINTAINERS (Write After Approval): Add "Carl Love".
* ppc: Fix record of HTM instructionsEdjunior Barbosa Machado2016-08-182-5/+9
| | | | | | | | | | | | The patch fixes the record support of Hardware Transactional Memory instructions on Power. It also solves a large number of unexpected failures from gdb.reverse testcases sigall-precsave.exp and sigall-reverse.exp that occur on distros which glibc uses HTM instructions. gdb/ChangeLog 2016-08-18 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> * rs6000-tdep.c (ppc_process_record_op31): Handle HTM instructions.
* Fix thinko in new weak undefined function testAlan Modra2016-08-182-1/+6
| | | | | * testsuite/ld-undefined/weak-undef.exp: Use unsupported not unresolved.
* Automatic date update in version.inGDB Administrator2016-08-181-1/+1
|
* Fix remove-inferior error messageSimon Marchi2016-08-174-2/+11
| | | | | | | | | | | | | | | | This error message should not contain the word symbol: (gdb) remove-inferiors 1 Warning: Can not remove current symbol inferior 1. gdb/ChangeLog: * inferior.c (remove_inferior_command): Fix error message. gdb/testsuite/ChangeLog: * gdb.multi/remove-inferiors.exp (test_remove_inferiors): Fix expected error message.
* Add remove-inferiors testSimon Marchi2016-08-173-0/+98
| | | | | | | | | | | | I noticed that the remove-inferiors command was not tested, and as I am doing some changes related to the user selection, I want to make sure I don't break it. For example, I want to make sure it's not possible to remove the current inferior. gdb/testsuite/ChangeLog: * gdb.multi/remove-inferiors.exp: New file. * gdb.multi/remove-inferiors.c: New file.
* Fix extraneous complaints about missing expected TLS relocation (i386).Cary Coutant2016-08-174-14/+25
| | | | | | | | | | | | | Build the test objects with the in-tree assembler. Also fix some cascading error messages caused by not resetting the skip_call_tls_get_addr_ flag after printing the error. gold/ * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing error message. * testsuite/Makefile.am (pr20216a): Add missing dependencies. (pr20308a): Add -Bgcctestdir/ to compile rules. * testsuite/Makefile.in: Regenerate.
* Remove stale commentSimon Marchi2016-08-172-2/+4
| | | | | | | | | This comment seems outdated, since exiting an inferior does not remove it. gdb/ChangeLog: * inferior.c (exit_inferior_1): Remove comment.
* Automatic date update in version.inGDB Administrator2016-08-171-1/+1
|
* sim: m68hc11: use standard STATIC_INLINE helperMike Frysinger2016-08-162-25/+34
| | | | Rather than redefine inline locally, use the common STATIC_INLINE.
* Automatic date update in version.inGDB Administrator2016-08-161-1/+1
|
* sim: unify symbol table handlingMike Frysinger2016-08-1517-170/+164
| | | | | | | | The common sim tracing code already handles loading and tracking of symbols from the target program so that it can show symbol info in trace/disassembly calls. Once we touch up the trace code and add a few API callbacks, ports don't need to do loading and searching of symbol tables themselves anymore.
* [GDB] Fix builds broken by proc-service changes.Matthew Wahab2016-08-152-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLIBC BZ#20311 introduced a change to install proc_service.h so that gdb didn't have to use the version it embeds in gdb_proc_service.h. The embedded version is guarded by HAVE_PROC_SERVICE_H and gdb_proc_service.h has a number other of includes and definitions, all of which are uncondional except for an include for gregset.h. This is only included if HAVE_PROC_SERIVCE_H is not defined. This causes a build failure when cross compiling gdb with the latest glibc because type definitions in gregset are used independently of HAVE_PROC_SERIVCE_H. In particular, they are used in gdb_proc_service.h when PRFPREGSET_T_BROKEN is set. The error messages on the failure are ---- binutils-gdb/gdb/gdb_proc_service.h:173:9: error: ‘gdb_fpregset_t’ does not name a type; did you mean ‘elf_fpregset_t’? typedef gdb_fpregset_t gdb_prfpregset_t; ^~~~~~~~~~~~~~ elf_fpregset_t binutils-gdb/gdb/gdb_proc_service.h:173:9: error: ‘gdb_fpregset_t’ does not name a type; did you mean ‘elf_fpregset_t’? typedef gdb_fpregset_t gdb_prfpregset_t; ^~~~~~~~~~~~~~ elf_fpregset_t binutils-gdb/gdb/proc-service.c:218:15: error: ‘gdb_prfpregset_t’ does not name a type; did you mean ‘gdb_fpregset_t’? const gdb_prfpregset_t *fpregset) ^~~~~~~~~~~~~~~~ gdb_fpregset_t ---- This patch moves the include for gregset.h to before the code guarded by HAVE_PROC_SERIVCE_H, so that it is always included. This is enough to fix the build. 2016-08-15 Matthew Wahab <matthew.wahab@arm.com> PR gdb/20457 * gdb_proc_service.h: Add an include of gregset.h [!HAVE_PROC_SERVICE_H]: Remove the include of gregset.h.
* Fix heap-buffer-overflow in explicit_location_lex_oneYao Qi2016-08-152-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I build GDB with -fsanitize=address, and see the error in tests, (gdb) PASS: gdb.linespec/ls-errs.exp: lang=C++: break 3 foo break -line 3 foo^M =================================================================^M ==4401==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000047487 at pc 0x819d8e bp 0x7fff4e4e6bb0 sp 0x7fff4e4e6ba8^M READ of size 1 at 0x603000047487 thread T0^[[1m^[[0m^M #0 0x819d8d in explicit_location_lex_one /home/yao/SourceCode/gnu/gdb/git/gdb/location.c:502^M #1 0x81a185 in string_to_explicit_location(char const**, language_defn const*, int) /home/yao/SourceCode/gnu/gdb/git/gdb/location.c:556^M #2 0x81ac10 in string_to_event_location(char**, language_defn const*) /home/yao/SourceCode/gnu/gdb/git/gdb/location.c:687^ the code in question is: > /* Special case: C++ operator,. */ > if (language->la_language == language_cplus > && strncmp (*inp, "operator", 8) <--- [1] > && (*inp)[9] == ',') > (*inp) += 9; > ++(*inp); The error is caused by the access to (*inp)[9] if 9 is out of its bounds. However [1] looks odd to me, because if strncmp returns true (non-zero), the following check "(*inp)[9] == ','" makes no sense any more. I suspect it was a typo in the code we meant to "strncmp () == 0". Another problem in the code above is that if *inp is "operator,", we first increment *inp by 9, and then increment it by one again, which is wrong to me. We should only increment *inp by 8 to skip "operator", and go back to the loop header to decide where we stop. gdb: 2016-08-15 Yao Qi <yao.qi@linaro.org> * location.c (explicit_location_lex_one): Compare the return value of strncmp with zero. Don't check (*inp)[9]. Increment *inp by 8.
* Automatic date update in version.inGDB Administrator2016-08-151-1/+1
|
* sim: m68hc11: standardize sim_cpu namingMike Frysinger2016-08-1310-347/+366
| | | | | We use "sim_cpu *cpu" in the sim code base, not "struct _sim_cpu" or the name "proc", so clean up this sim to follow along.
* sim: m68hc11: fix up various prototype related warningsMike Frysinger2016-08-138-12/+29
| | | | | | | | | | A few funcs are only used locally, so mark them static to avoid warnings due to -Wmissing-prototypes. Some funcs cast the return value wrong, so drop them (and let void * just work by default). Update some prototypes to be new style.
* sim: cgen: constify mode_namesMike Frysinger2016-08-133-2/+7
|
* Automatic date update in version.inGDB Administrator2016-08-141-1/+1
|
* sim: cgen: drop unused argv/envp definitionsMike Frysinger2016-08-132-8/+5
| | | | | The common argv/envp are used now by all ports, so drop this old cgen fragment.
* sim: bfin: split out common mach/model defines into arch.h [PR sim/20438]Mike Frysinger2016-08-134-26/+55
| | | | | | | | The current machs.h mixes common enums with Blackfin-specific defines. This causes us troubles with header inclusion order such that we can't drop the old SIM_CPU typedef (which is duplicated in common code). By splitting the two up, we can unwind this dependency chain, and drop the old typedef. It also fixes building with older gcc versions.
* Automatic date update in version.inGDB Administrator2016-08-131-1/+1
|
* Warn if the sh_info field of a symbol table does not index the first ↵Nick Clifton2016-08-122-0/+11
| | | | | | | | non-local symbol in the section. * readelf.c (process_symbol_table): Generate a warning if a local symbol is found at and offste greater than or equal to the sh_info field of it's section header.
* PR gold/20462: Fix bogus layout on ARM with linker script using PHDRS clauseRoland McGrath2016-08-122-20/+27
| | | | | | | gold/ PR gold/20462 * script-sections.cc (Script_sections::release_segments): Reset this->segments_created_.
* [gold] Implement HIDDEN syntax in linker scriptsRoland McGrath2016-08-123-1/+11
| | | | | | | gold/ * yyscript.y (HIDDEN): New %token. (assignment): Handle HIDDEN(string = expr) syntax. * script.cc (script_keyword_parsecodes): Add HIDDEN.
* Correct .dynsym sh_infoAlan Modra2016-08-1317-22/+41
| | | | | | | | | | | | | | | | | | | | | bfd/ * elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount. * elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount. (bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount. ld/ * testsuite/ld-tic6x/shlib-1.rd: Correct expected .dynsym sh_info. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
* Undo the previous change to the aarch64 sim - exporting aarch64_step() - and ↵Nick Clifton2016-08-123-9/+19
| | | | | | | | | | instead make aarch64_run correctly process sim events. * simulator.c (aarch64_step): Revert pervious delta. (aarch64_run): Call sim_events_tick after each instruction is simulated, and if necessary call sim_events_process. * simulator.h: Revert previous delta.
* Fix warning in gdb.base/signals-state-child.cYao Qi2016-08-122-1/+6
| | | | | | | | | | | | | | | | | I see the following warning when running signals-state-child.exp. gdb/testsuite/gdb.base/signals-state-child.c:77:4: warning: too many arguments for format [-Wformat-extra-args] fprintf (out, "sigaction={sa_handler=", i); ^ this patch is to remove the argument from fprintf. gdb/testsuite: 2016-08-12 Yao Qi <yao.qi@linaro.org> * gdb.base/signals-state-child.c (main): Remove "i" from fprintf's argument list.
* Add undefined weak function testsAlan Modra2016-08-124-45/+91
| | | | | | | * testsuite/ld-undefined/weak-fundef.s: New. * testsuite/ld-undefined/weak-undef.t: Don't specify filename. * testsuite/ld-undefined/weak-undef.exp: Run new tests. Rearrange much of old code. Use is_elf_format to select targets.
* Automatic date update in version.inGDB Administrator2016-08-121-1/+1
|
* Fix ERROR: target-cc does not existAlan Modra2016-08-112-6/+16
| | | | | | | PR ld/20436 * testsuite/lib/ld-lib.exp (at_least_gcc_version): Don't ignore remote_exec status. (check_gcc_plugin_enabled): Likewise.
* Export the single step function from the AArch64 simulator.Nick Clifton2016-08-114-9/+19
| | | | | | | | | | * interp.c (sim_create_inferior): Allow for being called with a NULL abfd parameter. If a bfd is provided, initialise the sim with that start address. * simulator.c (HALT_NYI): Just print out the numeric value of the instruction when not tracing. (aarch64_step): Change from static to global. * simulator.h: Add a prototype for aarch64_step().
* Fix fallout from gdb/20413's fix (x32: linux_ptrace_test_ret_to_nx: Cannot ↵Pedro Alves2016-08-112-1/+7
| | | | | | | | | | | | | | | | | | | | | | | PTRACE_PEEKUSER) Fixes, on NIOS GNU/Linux: In file included from /scratch/mbilal/nois-lite/src/gdb-trunk/gdb/gdbserver/../nat/linux-ptrace.c:26:0: /scratch/mbilal/nois-lite/src/gdb-trunk/gdb/gdbserver/../gregset.h:27:23: error: unknown type name 'gregset_t' #define GDB_GREGSET_T gregset_t ^ Fix this by including sys/procfs.h directly. We shouldn't really be including a gdb-only header in a gdb/nat/ file, anyway. Whoops. gdb/ChangeLog: 2016-08-11 Pedro Alves <palves@redhat.com> PR gdb/20413 * nat/linux-ptrace.c: Include <sys/procfs.h> instead of "gregset.h".
* Avoid testsuite errors about missing compilers.Nick Clifton2016-08-112-1/+11
| | | | | | | PR ld/20436 * testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): When not testing remotely, check to see if target compiler is installed before trying to run it.
* [AArch64] Reject -0.0 as an 8-bit FP immediateRichard Sandiford2016-08-114-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_aarch64_imm_float was accepting -0.0 even though that's not a valid immediate for any instruction. The FPIMM0 caller rejected it, but the FPIMM one would silently treat it as -2.0. This patch rejects -0.0 and adds testcases to illegal.[sd]. Before the patch, the final error emitted for illegal.s was: Error: cannot do 16-byte relocation which was matched by: [^:]*:569: Error: .* The error was reported against the last line of the file rather than the instruction that required the reloc. Adding more instructions meant that the line number also changed. Reporting against the wrong line isn't good from a QoI perspective but isn't what I'm trying to fix here. Until it's fixed, I thought it would be better to adjust the match to be against an end-of-file comment rather than against whatever the last instruction happens to be. gas/ * config/tc-aarch64.c (parse_aarch64_imm_float): Reject -0.0. * testsuite/gas/aarch64/illegal.s, testsuite/gas/aarch64/illegal.l: Add tests for -0.0. Add an end-of-file comment.
* PowerPC64 ELFv1 undefined weak functionsAlan Modra2016-08-112-20/+17
| | | | | | | | | | | | | Undefined weak functions, like __gmon_start__, were not being made dynamic or emitting plt call code. While the behaviour of undefined weak symbols is not defined in the ELF standard, the intention on powerpc64 was to make it possible to link without a definition of such symbols and at run time behave the same as if a definition was found at link time in a shared library. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't exit with non_got_ref true in any case where we could have generated dynbss copies but decide not to do so.
* Automatic date update in version.inGDB Administrator2016-08-111-1/+1
|