summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reduce file size for PT_GNU_RELRO segmentusers/hjl/masterH.J. Lu2015-03-191-0/+63
| | | | | | | | | | | | When a padding in file is used to align PT_GNU_RELRO segment, the maximum padding size is maximum page size minus 1. This patch trades memory size for file size by increasing memory size to avoid padding if file size will be reduced by more than maximum page minus a page and memory size will be increased by less than a page. * ldlang.c (output_prev_load_sec_find): New. (lang_size_sections_1): Reduce file size for PT_GNU_RELRO segment by increasing memory size.
* gdbserver/Linux: unbreak thread event randomizationPedro Alves2015-03-196-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wanting to make sure the new continue-pending-status.exp test tests both cases of threads 2 and 3 reporting an event, I added counters to the test, to make it FAIL if events for both threads aren't seen. Assuming a well behaved backend, and given a reasonable number of iterations, it should PASS. However, running that against GNU/Linux gdbserver, I found that surprisingly, that FAILed. GDBserver always reported the breakpoint hit for the same thread. Turns out that I broke gdbserver's thread event randomization recently, with git commit 582511be ([gdbserver] linux-low.c: better starvation avoidance, handle non-stop mode too). In that commit I missed that the thread structure also has a status_pending_p field... The end result was that count_events_callback always returns 0, and then if no thread is stepping, select_event_lwp always returns the event thread. IOW, no randomization is happening at all. Quite curious how all the other changes in that patch were sufficient to fix non-stop-fair-events.exp anyway even with that broken. Tested on x86_64 Fedora 20, native and gdbserver. gdb/gdbserver/ChangeLog: 2015-03-19 Pedro Alves <palves@redhat.com> * linux-low.c (count_events_callback, select_event_lwp_callback): Use the lwp's status_pending_p field, not the thread's. gdb/testsuite/ChangeLog: 2015-03-19 Pedro Alves <palves@redhat.com> * gdb.threads/continue-pending-status.exp (saw_thread_2) (saw_thread_3): New globals. (top level): Increment them when an event for the corresponding thread is seen. (no thread starvation): New test.
* native/Linux: internal error if resume is short-circuitedPedro Alves2015-03-195-4/+182
| | | | | | | | | | | | | | | | | | | | | | | | | If the linux_nat_resume's short-circuits the resume because the current thread has a pending status, and, a thread with a higher number was previously stopped for a breakpoint, GDB internal errors, like: /home/pedro/gdb/mygit/src/gdb/linux-nat.c:2590: internal-error: status_callback: Assertion `lp->status != 0' failed. Fix this by make status_callback bail out earlier. GDBserver is already doing the same. New test added that exercises this. gdb/ChangeLog: 2015-03-19 Pedro Alves <palves@redhat.com> * linux-nat.c (status_callback): Return early if the LWP has no status pending. gdb/testsuite/ChangeLog: 2015-03-19 Pedro Alves <palves@redhat.com> * gdb.threads/continue-pending-status.c: New file. * gdb.threads/continue-pending-status.exp: New file.
* select_event_lwp_callback: update commentsPedro Alves2015-03-194-6/+16
| | | | | | | | | | | | | | | | | This function (in both GDB and GDBserver) used to consider only SIGTRAP/breakpoint events, but that's no longer the case nowadays. gdb/gdbserver/ChangeLog: 2015-03-19 Pedro Alves <palves@redhat.com> * linux-low.c (select_event_lwp_callback): Update comments to no longer mention SIGTRAP. gdb/ChangeLog: 2015-03-19 Pedro Alves <palves@redhat.com> * linux-nat.c (select_event_lwp_callback): Update comment to no longer mention SIGTRAP.
* Fix building and testing dwarf debug section compression feature when zlib ↵Nick Clifton2015-03-194-7/+14
| | | | | | | | | | | is not available. PR gas/18087 gas/test * gas/i386/dw2-compress-1.d: Allow the test to pass regardless of whether the .debug_info section was compressed on not. bfd * compress.c (bfd_compress_section_contents): Do not define this function if it is not used.
* Automatic date update in version.inGDB Administrator2015-03-191-1/+1
|
* Tighten gdb.base/disp-step-syscall.expPedro Alves2015-03-182-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes several problems with this test. E.g,. with --target_board=native-extended-gdbserver on x86_64 Fedora 20, I get: Running /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/disp-step-syscall.exp ... FAIL: gdb.base/disp-step-syscall.exp: vfork: get hexadecimal valueof "$pc" (timeout) FAIL: gdb.base/disp-step-syscall.exp: vfork: single step over vfork final pc FAIL: gdb.base/disp-step-syscall.exp: vfork: delete break vfork insn FAIL: gdb.base/disp-step-syscall.exp: vfork: continue to marker (vfork) (the program is no longer running) And with --target=native-gdbserver, I get: Running /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/disp-step-syscall.exp ... KPASS: gdb.base/disp-step-syscall.exp: vfork: single step over vfork (PRMS server/13796) FAIL: gdb.base/disp-step-syscall.exp: vfork: get hexadecimal valueof "$pc" (timeout) FAIL: gdb.base/disp-step-syscall.exp: vfork: single step over vfork final pc FAIL: gdb.base/disp-step-syscall.exp: vfork: delete break vfork insn FAIL: gdb.base/disp-step-syscall.exp: vfork: continue to marker (vfork) (the program is no longer running) First, the lack of fork support on remote targets is supposed to be kfailed, so the KPASS is obviously bogus. The extended-remote board should have KFAILed too. The problem is that the test is using "is_remote" instead of gdb_is_target_remote. And then, I get: (gdb) PASS: gdb.base/disp-step-syscall.exp: vfork: set displaced-stepping on stepi Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. (gdb) PASS: gdb.base/disp-step-syscall.exp: vfork: single step over vfork Obviously, that should be a FAIL. The problem is that the test only expects SIGILL, not SIGSEGV. It also doesn't bail correctly if an internal error or some other pattern caught by gdb_test_multiple matches. The test doesn't really need to match specific exits/crashes patterns, if the PASS regex is improved, like in ... ... this and the other "stepi" tests are a bit too lax, passing on ".*". This tightens those up to expect "x/i" and the "=>" current PC indicator, like in: 1: x/i $pc => 0x3b36abc9e2 <vfork+34>: syscall On x86_64 Fedora 20, I now get a quick KFAIL instead of timeouts with both the native-extended-gdbserver and native-gdbserver boards: PASS: gdb.base/disp-step-syscall.exp: vfork: delete break vfork PASS: gdb.base/disp-step-syscall.exp: vfork: continue to syscall insn vfork PASS: gdb.base/disp-step-syscall.exp: vfork: set displaced-stepping on KFAIL: gdb.base/disp-step-syscall.exp: vfork: single step over vfork (PRMS: server/13796) and a full pass with native testing. gdb/testsuite/ 2015-03-18 Pedro Alves <palves@redhat.com> * gdb.base/disp-step-syscall.exp (disp_step_cross_syscall): Use gdb_is_target_remote instead of is_remote. Use gdb_test_multiple instead of gdb_expect. Exit early if gdb_test_multiple hits its internal matches. Tighten stepi tests expected output. Fail on exit with any signal, instead of just SIGILL.
* Make bfd_compress_section_contents staticH.J. Lu2015-03-183-24/+13
| | | | | * compress.c (bfd_compress_section_contents): Make it static. * bfd/bfd-in2.h: Regenerated.
* Add a testcase for PR gas/18087H.J. Lu2015-03-187-3/+211
| | | | | | | | PR gas/18087 * gas/i386/dw2-compress-1.d: Revert the last change. * gas/i386/dw2-compress-3.d: New. * gas/i386/dw2-compress-3.s: Likewise. * gas/i386/i386.exp: Run dw2-compress-3 for ELF targets.
* Fixes a problem generating relocs for import libraries created by Microsoft ↵Nick Clifton2015-03-182-0/+15
| | | | | | | | tools for the x85_64 architecture. PR ld/16598 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs suitable for the AMD64.
* Fix debug section compression so that it is only performed if it would make ↵Jon Turney2015-03-1811-24/+89
| | | | | | | | | | | | | | | | | | | | | | | | the section smaller. PR binutils/18087 gas * doc/as.texinfo: Note that when gas compresses debug sections the compression is only performed if it makes the section smaller. * write.c (compress_debug): Do not compress a debug section if doing so would make it larger. tests * gas/i386/dw2-compress-1.d: Do not expect the .debug_abbrev or .debug_info sections to be compressed. binu * doc/binutils.texi: Note that when objcopy compresses debug sections the compression is only performed if it makes the section smaller. bfd * coffgen.c (make_a_section_from_file): Only prepend a z to a debug section's name if the section was actually compressed. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. * compress.c (bfd_init_section_compress_status): Do not compress the section if doing so would make it bigger. In such cases leave the section alone and return COMPRESS_SECTION_NONE.
* Fix amd64 windows unwinding issues within MS dlls.Tristan Gingold2015-03-182-36/+86
| | | | | | | | | | | | | Unwind info in system dlls uses almost all possible codes, contrary to unwind info generated by gcc. A few issues have been discovered: incorrect handling of SAVE_NONVOL opcodes and incorrect in prologue range checks. Furthermore I added comments not to forget what has been investigated. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Move redirection code to ... (amd64_windows_frame_decode_insns): ... Here. Fix in prologue checks. Fix SAVE_NONVOL operations. Add debug code and comments.
* Reimplement "vFile:fstat" without qSupportedGary Benson2015-03-186-28/+25
| | | | | | | | | | | | | | | | | | | | This commit makes support for the "vFile:fstat" packet be detected by probing rather than using qSupported, for consistency with the other vFile: packets. gdb/ChangeLog: (remote_protocol_features): Remove the "vFile:fstat" feature. (remote_hostio_fstat): Probe for "vFile:fstat" support. gdb/doc/ChangeLog: * gdb.texinfo (General Query Packets): Remove documentation for now-removed vFile:fstat qSupported features. gdb/gdbserver/ChangeLog: * server.c (handle_query): Do not report vFile:fstat as supported.
* Support catch syscall on aarch64 linuxYao Qi2015-03-186-4/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, This patch is to support catch syscall on aarch64 linux. We implement gdbarch method get_syscall_number for aarch64-linux, and add aarch64-linux.xml file, which looks straightforward, however the changes to test case doesn't. First of all, we enable catch-syscall.exp on aarch64-linux target, but skip the multi_arch testing on current stage. I plan to touch multi arch debugging on aarch64-linux later. Then, when I run catch-syscall.exp on aarch64-linux, gcc errors that SYS_pipe isn't defined. We find that aarch64 kernel only has pipe2 syscall and libc already convert pipe to pipe2. As a result, I change catch-syscall.c to use SYS_pipe if it is defined, otherwise use SYS_pipe2 instead. The vector all_syscalls in catch-syscall.exp can't be pre-determined, so I add a new proc setup_all_syscalls to fill it, according to the availability of SYS_pipe. Regression tested on {x86_64, aarch64}-linux x {native, gdbserver}. gdb: 2015-03-18 Yao Qi <yao.qi@linaro.org> PR tdep/18107 * aarch64-linux-tdep.c: Include xml-syscall.h (aarch64_linux_get_syscall_number): New function. (aarch64_linux_init_abi): Call set_gdbarch_get_syscall_number. * syscalls/aarch64-linux.xml: New file. gdb/testsuite: 2015-03-18 Yao Qi <yao.qi@linaro.org> PR tdep/18107 * gdb.base/catch-syscall.c [!SYS_pipe] (pipe2_syscall): New variable. * gdb.base/catch-syscall.exp: Don't skip it on aarch64*-*-linux* target. Remove elements in all_syscalls. (test_catch_syscall_multi_arch): Skip it on aarch64*-linux* target. (setup_all_syscalls): New proc.
* Use %F instead of %X for einfoChen Gang2015-03-182-2/+6
| | | | | | | When src or dst is NULL, the next fread or fwrite will cause a segmentation fault, so we need to treat it as fatal. * ldmain.c (main): Use %F instead of %X for einfo.
* Exclude target-zlib if target-libjava isn't builtH.J. Lu2015-03-173-6/+24
| | | | | | * configure.ac (target_configdirs): Exclude target-zlib if target-libjava isn't built. * configure: Regenerated.
* Revert "Disable all target libraries if not building gcc"H.J. Lu2015-03-171-5/+0
| | | | This reverts commit 35fece71d50e1883e67fcd28c69245de4335b8b5.
* Automatic date update in version.inGDB Administrator2015-03-181-1/+1
|
* sim/erc32: Removed type mismatch compiler warningsJiri Gaisler2015-03-172-9/+19
|
* sim/erc32: Added -v command line switch for verbose outputJiri Gaisler2015-03-175-12/+23
|
* Add znver1 processorGanesh Gopalasubramanian2015-03-1724-5285/+5853
|
* Fix name of ser_base_setstopbits's second argument.Yurij Grechishhev2015-03-172-1/+6
| | | | | | | | | Small copy/paste error, most likely... gdb/ChangeLog: * ser-base.h (ser_base_setstopbits): Change second argument name from "rate" to "num".
* Sync config-ml.in with GCC trunkH.J. Lu2015-03-172-30/+45
| | | | | | | Sync with GCC 2014-06-13 Thomas Schwinge <thomas@codesourcery.com> * config-ml.in: Robustify ac_configure_args parsing.
* Remove forward declaration of struct statGary Benson2015-03-172-2/+8
| | | | | | | | | | | | Forward declarations of struct stat break the Windows build. This commit removes a forward declaration of struct stat and includes sys/stat.h directly instead. gdb/ChangeLog: PR gdb/18131 * common/common-remote-fileio.h (sys/stat.h): New include. (stuct stat): Remove forward declaration.
* Fix elf64-ppc.c electric fence warningAlan Modra2015-03-172-5/+16
| | | | | * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0 on nothing to do, before malloc of returned symbol array.
* Automatic date update in version.inGDB Administrator2015-03-171-1/+1
|
* watchpoint-reuse-slot.exp: skip setting HW breakpoints on some addressYao Qi2015-03-162-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We see some fails in watchpoint-reuse-slot.exp on aarch64-linux, because it sets some HW breakpoint on some address doesn't meet the alignment requirements by kernel, kernel will reject the ptrace (PTRACE_SETHBPREGS) call, and some fails are caused, for example: (gdb) PASS: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x hbreak: : width 1, iter 0: base + 0: delete $bpnum hbreak *(buf.byte + 0 + 1)^M Hardware assisted breakpoint 80 at 0x410a61^M (gdb) PASS: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x hbreak: : width 1, iter 0: base + 1: hbreak *(buf.byte + 0 + 1) stepi^M Warning:^M Cannot insert hardware breakpoint 80.^M Could not insert hardware breakpoints:^M You may have requested too many hardware breakpoints/watchpoints.^M ^M (gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x hbreak: : width 1, iter 0: base + 1: stepi advanced hbreak *(buf.byte + 0 + 1)^M Hardware assisted breakpoint 440 at 0x410a61^M Warning:^M Cannot insert hardware breakpoint 440.^M Could not insert hardware breakpoints:^M You may have requested too many hardware breakpoints/watchpoints.^M ^M (gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted on: watch x hbreak: : width 1, iter 0: base + 1: hbreak *(buf.byte + 0 + 1) This patch is to skip some tests by checking proc valid_addr_p. We can handle other targets in valid_addr_p too. gdb/testsuite: 2015-03-16 Yao Qi <yao.qi@linaro.org> * gdb.base/watchpoint-reuse-slot.exp (valid_addr_p): New proc. (top level): Skip tests if valid_addr_p returns false for $cmd1 or $cmd2.
* Update top-level files from GCC trunkH.J. Lu2015-03-166-2564/+5305
| | | | | | | | * Makefile.def: Updated from GCC trunk. * Makefile.tpl: Likewise. * configure.ac: Likewise. * Makefile.in: Regenerated. * configure: Likewise.
* Sync isl.m4 with GCC treeH.J. Lu2015-03-162-17/+11
| | | | * isl.m4: Sync with GCC tree.
* Sync elf.m4 with GCC treeH.J. Lu2015-03-162-2/+12
| | | | | | | Sync with GCC 2015-02-18 Thomas Schwinge <thomas@codesourcery.com> * elf.m4 (ACX_ELF_TARGET_IFELSE): nvptx-*-none isn't ELF.
* Append -g -Os rather than overwritingH.J. Lu2015-03-162-2/+11
| | | | | | | | | Sync with GCC 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk> * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than overwriting. (CXXFLAGS_FOR_TARGET): Similarly.
* Don't reset CXXFLAGS_FOR_TARGETH.J. Lu2015-03-162-3/+11
| | | | | | | | Sync with GCC 2014-04-25 Marc Glisse <marc.glisse@inria.fr> PR target/43538 * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
* Sync bootstrap-asan.mk/bootstrap-lto.mk with GCC treeH.J. Lu2015-03-163-5/+19
| | | | | * bootstrap-asan.mk: Sync with GCC tree. * bootstrap-lto.mk: Likewise.
* Remove cloog.m4H.J. Lu2015-03-162-152/+4
| | | | * cloog.m4: Removed.
* Disable all target libraries if not building gccH.J. Lu2015-03-163-0/+11
| | | | | | | Don't build target libraries if not building gcc. * configure.ac (target_configdirs): Unset if not building gcc. * configure: Regenerated.
* Fetch all registers before writing the core register notes.John Baldwin2015-03-162-1/+7
| | | | | | | | | | | | | | | | | Without this, not all registers were present in the core generated by gcore. For example, running 'gcore' on a program without examining the vector registers (SSE or AVX) would store all the vector registers as zeros because they were not pulled into the regcache. Running 'info vector' before 'gcore' would store the correct values in the core since it populated the regcache. For Linux processes, a similar operation is achieved by having the thread iterator callback invoke target_fetch_registers on each thread before its corresponding register notes are dumped. gdb/ChangeLog: * fbsd-tdep.c (fbsd_make_corefile_notes): Fetch all target registers before writing core register notes.
* stub termcap, add extern "C"Yuanhui Zhang2015-03-163-1/+16
| | | | | | | | | | | | | | | | | | Fixes linking an --enable-build-with-cxx build on mingw: ../readline/terminal.c:278: undefined reference to `tgetnum' ../readline/terminal.c:297: undefined reference to `tgetnum' ../readline/libreadline.a(terminal.o): In function `get_term_capabilities': ../readline/terminal.c:427: undefined reference to `tgetstr' ../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io': [etc.] gdb/ChangeLog: 2015-03-16 Yuanhui Zhang <asmwarrior@gmail.com> Pedro Alves <palves@redhat.com> * gdb_curses.h (tgetnum): Mark with EXTERN_C. * stub-termcap.c (tgetent, tgetnum, tgetflag, tgetstr, tputs) (tgoto): Wrap with extern "C".
* stub-termcap.c: prototype tputs's parameter's parameter, for C++ modePedro Alves2015-03-162-2/+7
| | | | | | | | | | | | src/gdb/stub-termcap.c: In function 'int tputs(char*, int, int (*)())': src/gdb/stub-termcap.c:67:22: error: too many arguments to function outfun (*string++); ^ gdb/ChangeLog: 2015-03-16 Pedro Alves <palves@redhat.com> Yuanhui Zhang <asmwarrior@gmail.com> * stub-termcap.c (tputs): Change prototype.
* windows-nat.c: conflicting declaration of struct thread_info in C++ modeYuanhui Zhang2015-03-162-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | Building mingw GDB with --enable-build-with-cxx shows: ../../binutils-gdb/gdb/windows-nat.c: At global scope: ../../binutils-gdb/gdb/windows-nat.c:192:1: error: conflicting declaration 'typedef struct thread_info_struct thread_info' thread_info; ^ In file included from ../../binutils-gdb/gdb/windows-nat.c:52:0: ../../binutils-gdb/gdb/gdbthread.h:160:8: error: 'struct thread_info' has a previous declaration as 'struct thread_info' struct thread_info ^ Simply rename the structure to avoid the conflict. gdb/ChangeLog: 2015-03-16 Yuanhui Zhang <asmwarrior@gmail.com> Pedro Alves <palves@redhat.com> * windows-nat.c (struct thread_info_struct): Rename to ... (struct windows_thread_info_struct): ... this. (thread_info): Rename to ... (windows_thread_info): ... this. All users updated.
* Removes a #if 1 ... #endif accidentally left in the source code.Nick Clifton2015-03-162-2/+5
| | | | * dwarf2dbg.c (out_header): Remove spurious #if 1.
* Fixes a problem with the RX port trying to perform linker relaxation when ↵Nick Clifton2015-03-162-1/+19
| | | | | | | | -no-keep-memory has been enabled. * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not stored in the elf_section_data structure then load them as necessary.
* sim: mcore/microblaze: strip trailing whitespaceMike Frysinger2015-03-164-140/+148
| | | | No functional changes here.
* sim: mcore/microblaze: clean up a bitMike Frysinger2015-03-168-272/+319
| | | | Fix some various warnings and enable the extra warnings options.
* sim: convert some old prototypesMike Frysinger2015-03-163-9/+9
|
* sim: rename tconfig.in to tconfig.hMike Frysinger2015-03-16109-404/+410
| | | | | | | | | | | | | Rather than manually include tconfig.h when we think we'll need it (which is error prone as it can define symbols we expect from config.h), have it be included directly by config.h. Since we know we have to include that header everywhere already, this will make sure tconfig.h isn't missed. It should also be fine as tconfig.h is supposed to be simple and only set up a few core defines for the target. This allows us to stop symlinking it in place all the time and just use it straight out of the respective source directory.
* sim/erc32: use SIM_AC_OPTION_HOSTENDIAN to probe for host endianessJiri Gaisler2015-03-1610-56/+296
|
* Automatic date update in version.inGDB Administrator2015-03-161-1/+1
|
* sim: dv-sockser: push module init prototype downMike Frysinger2015-03-1524-91/+68
| | | | | | | | Pull out the duplicated dv_sockser_install prototype from the tconfig.in files and put it in the one place it gets used -- sim-module.c. This is still arguably incorrect, but it's better than the status quo where the tconfig.in has to include header files and duplicate the dv-sockser func. The tconfig header is meant to be simple and contain a target defines.
* sim: bfin: fix signed warningMike Frysinger2015-03-142-1/+5
| | | | Fix the type of the local var to match the function it is passed to.
* sim: delete unused sim-inline.c ruleMike Frysinger2015-03-142-9/+5
| | | | | | | This dates back to the start of the repo, but has never really been used. The sim-inline.c file has been checked in to the source, and attempts to build it in the build tree leads to a circular dep warning from make. It also doesn't produce a file that is usable -- it can't be compiled. Punt!