aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-24Automatic date update in version.inGDB Administrator1-1/+1
2016-03-23Automatic date update in version.inGDB Administrator1-1/+1
2016-03-22Automatic date update in version.inGDB Administrator1-1/+1
2016-03-21Automatic date update in version.inGDB Administrator1-1/+1
2016-03-20Automatic date update in version.inGDB Administrator1-1/+1
2016-03-19Automatic date update in version.inGDB Administrator1-1/+1
2016-03-18Automatic date update in version.inGDB Administrator1-1/+1
2016-03-17btrace: fix PR gdb/19829Markus Metzger10-32/+1155
This is a backport of 33b4777ca1b7 btrace, frame: fix crash in get_frame_type a038fa3e14a4 stack: check frame_unwind_caller_id 2f3ef606b912 frame: add skip_tailcall_frames In skip_artificial_frames we repeatedly call get_prev_frame_always until we get a non-inline and non-tailcall frame assuming that there must be such a frame eventually. For record targets, however, we may have a frame chain that consists only of artificial frames. This leads to a crash in get_frame_type when dereferencing a NULL frame pointer. Change skip_artificial_frames and skip_tailcall_frames to return NULL in such a case and modify each caller to cope with a NULL return. In frame_unwind_caller_pc and frame_unwind_caller_arch, we simply assert that the returned value is not NULL. Their caller was supposed to check frame_unwind_caller_id before calling those functions. In other cases, we thrown an error. In infcmd further move the skip_tailcall_frames call to the forward-stepping case since we don't need a frame for reverse execution and we don't want to fail because of that. Reverse-finish does make sense for a tailcall frame. gdb/ * frame.h (skip_tailcall_frames): New. * infcmd.c (finish_command): Call skip_tailcall_frames. * frame.c (skip_artificial_frames): Return NULL if only artificial frames are found. Update comment. (frame_pop): Call skip_tailcall_frames. (frame_unwind_caller_id): Handle NULL return. (frame_unwind_caller_pc, frame_unwind_caller_arch): Assert that skip_artificial_frames does not return NULL. (frame_pop): Add an error if only tailcall frames are found. * infcmd.c (finish_command): Move skip_tailcall_frames call into forward- execution case. Add an error if only tailcall frames are found. * stack.c (frame_info): Check frame_unwind_caller_id. testsuite/ * gdb.btrace/tailcall-only.exp: New. * gdb.btrace/tailcall-only.c: New. * gdb.btrace/x86_64-tailcall-only.S: New. * gdb.btrace/i686-tailcall-only.S: New.
2016-03-17Automatic date update in version.inGDB Administrator1-1/+1
2016-03-16Automatic date update in version.inGDB Administrator1-1/+1
2016-03-15Fix PR gdb/19676: Internal error in linux-thread.db.c if /proc not mountedPedro Alves2-6/+20
If /proc is not mounted, GDB fails an assertion in find_new_threads_once: Continuing. .../src/gdb/linux-thread-db.c:1249: internal-error: find_new_threads_once: Assertion `!target_has_execution' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) That was supposed to catch misuses of td_ta_thr_iter, which is unsafe for live debugging. However, if /proc is not mounted, we still fallback to using it. I didn't bother with a warning, because GDB already prints several others related to failing to open /proc files. gdb/ChangeLog: 2016-03-15 Pedro Alves <palves@redhat.com> PR gdb/19676 * linux-thread-db.c (try_thread_db_load_1): Leave info->td_ta_thr_iter_p NULL iff debugging a live process and we have /proc access. (find_new_threads_once): Assert that we have a non-NULL info->td_ta_thr_iter_p instead of checking whether the target has execution.
2016-03-15Fix PR gdb/19676: Disable displaced stepping if /proc not mountedPedro Alves3-2/+12
On GNU/Linux archs that support displaced stepping, if /proc is not mounted, GDB gets stuck not able to step past breakpoints: (gdb) c Continuing. dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2163 2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r); Cannot find AT_ENTRY auxiliary vector entry. (gdb) c Continuing. dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2163 2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r); Cannot find AT_ENTRY auxiliary vector entry. (gdb) That's because GDB can't figure out where the scratch pad is. This is a regression introduced by the earlier changes to make the Linux native target always work in non-stop mode. This commit makes GDB detect the case and fallback to stepping over breakpoints in-line. gdb/ChangeLog: 2016-03-15 Pedro Alves <palves@redhat.com> PR gdb/19676 * infrun.c (displaced_step_prepare): Also disable displaced stepping on NOT_SUPPORTED_ERROR. * linux-tdep.c (linux_displaced_step_location): If reading auxv fails, throw NOT_SUPPORTED_ERROR instead of generic error.
2016-03-15Automatic date update in version.inGDB Administrator1-1/+1
2016-03-14Automatic date update in version.inGDB Administrator1-1/+1
2016-03-13Automatic date update in version.inGDB Administrator1-1/+1
2016-03-12Automatic date update in version.inGDB Administrator1-1/+1
2016-03-11Automatic date update in version.inGDB Administrator1-1/+1
2016-03-10Automatic date update in version.inGDB Administrator1-1/+1
2016-03-09Automatic date update in version.inGDB Administrator1-1/+1
2016-03-08Automatic date update in version.inGDB Administrator1-1/+1
2016-03-07Automatic date update in version.inGDB Administrator1-1/+1
2016-03-06Automatic date update in version.inGDB Administrator1-1/+1
2016-03-05Automatic date update in version.inGDB Administrator1-1/+1
2016-03-04Automatic date update in version.inGDB Administrator1-1/+1
2016-03-03Automatic date update in version.inGDB Administrator1-1/+1
2016-03-02Automatic date update in version.inGDB Administrator1-1/+1
2016-03-01Automatic date update in version.inGDB Administrator1-1/+1
2016-02-29Automatic date update in version.inGDB Administrator1-1/+1
2016-02-28Automatic date update in version.inGDB Administrator1-1/+1
2016-02-27Automatic date update in version.inGDB Administrator1-1/+1
2016-02-26Automatic date update in version.inGDB Administrator1-1/+1
2016-02-25Automatic date update in version.inGDB Administrator1-1/+1
2016-02-24Bump GDB version number to 7.11.0.DATE-git.Joel Brobecker2-1/+5
gdb/ChangeLog: * version.in: Set GDB version number to 7.11.0.DATE-git.
2016-02-24Document the GDB 7.11 release in gdb/ChangeLogJoel Brobecker1-0/+4
gdb/ChangeLog: GDB 7.11 released.
2016-02-24Set GDB version number to 7.11.gdb-7.11-releaseJoel Brobecker2-1/+5
gdb/ChangeLog: * version.in: Set GDB version number to 7.11.
2016-02-24Automatic date update in version.inGDB Administrator1-1/+1
2016-02-23Automatic date update in version.inGDB Administrator1-1/+1
2016-02-22gdb-gdb.py: SyntaxError: Missing parentheses in call to 'print'Jan Kratochvil2-4/+8
After building GDB --with-python=/usr/bin/python3 and for example stripping ./gdb and running: ./gdb -data-directory data-directory/ -iex "add-auto-load-safe-path $PWD/gdb-gdb.gdb" -iex "add-auto-load-safe-path $PWD/gdb-gdb. py" ./gdb I get: Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] File "/home/jkratoch/redhat/gdb-test-python3/gdb/gdb-gdb.py", line 91 print "Warning: Cannot find enum type_flag_value type." ^ SyntaxError: Missing parentheses in call to 'print' (top-gdb) q gdb/ChangeLog 2016-02-22 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.
2016-02-22Automatic date update in version.inGDB Administrator1-1/+1
2016-02-21Automatic date update in version.inGDB Administrator1-1/+1
2016-02-20Automatic date update in version.inGDB Administrator1-1/+1
2016-02-19Automatic date update in version.inGDB Administrator1-1/+1
2016-02-18Automatic date update in version.inGDB Administrator1-1/+1
2016-02-17Automatic date update in version.inGDB Administrator1-1/+1
2016-02-16PR remote/19496, internal err forking-threads-plus-bkptDon Breazeal4-7/+18
This patch fixes an internal error that occurs in gdb.threads/forking-threads-plus-breakpoint.exp: /blah/binutils-gdb/gdb/target.c:2723: internal-error: Can't determine the current address space of thread Thread 3170.3170 In default_thread_address_space, find_inferior_ptid couldn't find 3170.3170 because it had been overwritten in inferior_appeared, called as follows: inferior_appeared remote_add_inferior remote_notice_new_inferior remote_update_thread_list The cause of the problem was the following sequence of events: * GDB knows only about the main thread * the first fork event is reported to GDB, saved as pending_event * qXfer:threads:read gets the threads from the remote. remove_new_fork_children id's the fork child from the pending event and removes it from the list reported to GDB. All the rest of the threads, including the fork parent, are added to the GDB thread list. * GDB stops all the threads. All the stop events are pushed onto the stop reply queue behind the pending fork event. The fork waitstatus is saved in the fork parent thread's pending status field thread_info.suspend. * remote_wait_ns calls queued_stop_reply and process_stop_reply to remove the fork event from the front of the stop reply queue and save event information in the thread_info structure for the fork parent thread. Unfortunately, none of the information saved in this way is the fork-specific information. * A subsequent qXfer:threads:read packet gets the thread list including the fork parent and fork child. remove_new_fork_children checks the thread list to see if there is a fork parent, doesn't find one, checks the stop reply queue for a pending fork event, doesn't find one, and allows the fork child thread to be reported to GDB before the fork event has been handled. remote_update_thread_list calls remote_notice_new_thread and overwrites the current (main) thread in inferior_appeared. So the fork event has been reported out of target_wait but it was left pending on the infrun side (infrun.c:save_waitstatus). IOW, the fork event hasn't been processed by handle_inferior_event yet, so it hasn't made it to tp->pending_follow yet. The fix is to check thread_info.suspend along with the thread_info.pending_follow in remote.c:remove_new_fork_children, to prevent premature reporting of the fork child thread creation. gdb/ChangeLog: PR remote/19496 * remote.c (remove_new_fork_children): Check for pending fork status in thread_info.suspend. gdb/testsuite/ChangeLog: PR remote/19496 * gdb.threads/forking-threads-plus-breakpoint.exp (do_test): Remove kfail for PR remote/19496.
2016-02-16Fix cleanup in arm_linux_software_single_stepYao Qi2-1/+8
I see the following error in testing aarch64 GDB debugging arm program. (gdb) PASS: gdb.reverse/readv-reverse.exp: set breakpoint at marker2 continue Continuing. ================================================================= ==32273==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x000000ce4c00 in thread T0 #0 0x2ba5615645c7 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x545c7)^M #1 0x4be8b5 in VEC_CORE_ADDR_cleanup /home/yao/SourceCode/gnu/gdb/git/gdb/common/gdb_vecs.h:34^M #2 0x5e6d95 in do_my_cleanups /home/yao/SourceCode/gnu/gdb/git/gdb/common/cleanups.c:154^M #3 0x64c99a in fetch_inferior_event /home/yao/SourceCode/gnu/gdb/git/gdb/infrun.c:3975^M #4 0x678437 in inferior_event_handler /home/yao/SourceCode/gnu/gdb/git/gdb/inf-loop.c:44^M #5 0x5078f6 in remote_async_serial_handler /home/yao/SourceCode/gnu/gdb/git/gdb/remote.c:13223^M #6 0x4cecfd in run_async_handler_and_reschedule /home/yao/SourceCode/gnu/gdb/git/gdb/ser-base.c:137^M #7 0x676864 in gdb_wait_for_event /home/yao/SourceCode/gnu/gdb/git/gdb/event-loop.c:834^M #8 0x676a27 in gdb_do_one_event /home/yao/SourceCode/gnu/gdb/git/gdb/event-loop.c:323^M #9 0x676aed in start_event_loop /home/yao/SourceCode/gnu/gdb/git/gdb/event-loop.c:347^M #10 0x6706d2 in captured_command_loop /home/yao/SourceCode/gnu/gdb/git/gdb/main.c:318^M #11 0x66db8c in catch_errors /home/yao/SourceCode/gnu/gdb/git/gdb/exceptions.c:240^M #12 0x6716dd in captured_main /home/yao/SourceCode/gnu/gdb/git/gdb/main.c:1157^M #13 0x66db8c in catch_errors /home/yao/SourceCode/gnu/gdb/git/gdb/exceptions.c:240^M #14 0x671b7a in gdb_main /home/yao/SourceCode/gnu/gdb/git/gdb/main.c:1165^M #15 0x467684 in main /home/yao/SourceCode/gnu/gdb/git/gdb/gdb.c:32^M #16 0x2ba563ed7ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4)^M #17 0x4676b2 (/scratch/yao/gdb/build-git/aarch64-linux-gnu/gdb/gdb+0x4676b2) looks we should discard cleanup if function arm_linux_software_single_step returns early, or create cleanup when it is needed. gdb: 2016-02-16 Yao Qi <yao.qi@linaro.org> * arm-linux-tdep.c (arm_linux_software_single_step): Assign 'old_chain' later.
2016-02-16Automatic date update in version.inGDB Administrator1-1/+1
2016-02-15Add missing gdb.arch/i386-prologue.c prototypesJan Kratochvil2-0/+8
The testfile has not ran because: gdb.arch/i386-prologue.c:34:3: warning: implicit declaration of function 'standard' [-Wimplicit-function-declaration] standard (); ^ gdb.arch/i386-prologue.c:35:3: warning: implicit declaration of function 'stack_align_ecx' [-Wimplicit-function-declaration] stack_align_ecx (); ^ gdb.arch/i386-prologue.c:36:3: warning: implicit declaration of function 'stack_align_edx' [-Wimplicit-function-declaration] stack_align_edx (); ^ gdb.arch/i386-prologue.c:37:3: warning: implicit declaration of function 'stack_align_eax' [-Wimplicit-function-declaration] stack_align_eax (); ^ gdb/testsuite/ChangeLog 2016-02-15 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.arch/i386-prologue.c: Add missing prototypes.
2016-02-15Fix more testcases with standard_output_file.Jan Kratochvil4-3/+9
Since commit 2151ccc56c74b55a8f0debf0724a495368f92591 Author: Simon Marchi <simon.marchi@ericsson.com> Date: Mon Feb 8 14:02:36 2016 -0500 Always organize test artifacts in a directory hierarchy these testfiles could not build. gdb/testsuite/ChangeLog 2016-02-15 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.arch/i386-gnu-cfi.exp: Use standard_output_file. * gdb.arch/i386-prologue.exp: Likewise. * gdb.arch/i386-size.exp: Likewise.
2016-02-15i386-biarch-core.exp: Use standard_output_fileSimon Marchi2-1/+6
Fix the core file path to use the standard output directory. gdb/testsuite/ChangeLog: * i386-biarch-core.exp: Define corefile using standard_output_file.