aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/ChangeLog
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-06-17 10:25:12 +0100
committerYao Qi <yao.qi@linaro.org>2016-06-17 10:38:19 +0100
commitf79b145de30d6eaafc1f3f5b2aa913519fcd311f (patch)
treecb757e2f1d2111f4fd4809986e286dc1b110a03e /gdb/gdbserver/ChangeLog
parenta28d8e5037333291991f7b0036b273e8ca1ffc34 (diff)
downloadgdb-f79b145de30d6eaafc1f3f5b2aa913519fcd311f.zip
gdb-f79b145de30d6eaafc1f3f5b2aa913519fcd311f.tar.gz
gdb-f79b145de30d6eaafc1f3f5b2aa913519fcd311f.tar.bz2
Switch to current thread in finish_step_over
This patch adds some sanity check that reinsert breakpoints must be there when doing step-over on software single step target. The check triggers an assert when running forking-threads-plus-breakpoint.exp on arm-linux target, gdb/gdbserver/linux-low.c:4714: A problem internal to GDBserver has been detected.^M int finish_step_over(lwp_info*): Assertion `has_reinsert_breakpoints ()' failed. the error happens when GDBserver has already resumed a thread of process A for step-over (and wait for it hitting reinsert breakpoint), but receives detach request for process B from GDB, which is shown in the backtrace below, (gdb) bt #2 0x000228aa in finish_step_over (lwp=0x12bbd98) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:4703 #3 0x00025a50 in finish_step_over (lwp=0x12bbd98) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:4749 #4 complete_ongoing_step_over () at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:4760 #5 linux_detach (pid=25228) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:1503 #6 0x00012bae in process_serial_event () at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/server.c:3974 #7 handle_serial_event (err=<optimized out>, client_data=<optimized out>) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/server.c:4347 #8 0x00016d68 in handle_file_event (event_file_desc=<optimized out>) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/event-loop.c:429 #9 0x000173ea in process_event () at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/event-loop.c:184 #10 start_event_loop () at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/event-loop.c:547 #11 0x0000aa2c in captured_main (argv=<optimized out>, argc=<optimized out>) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/server.c:3719 #12 main (argc=<optimized out>, argv=<optimized out>) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/server.c:3804 the sanity check tries to find the reinsert breakpoint from process B, but nothing is found. It is wrong, we need to search in process A, since we started step-over of a thread of process A. (gdb) p lwp->thread->entry.id $3 = {pid = 25120, lwp = 25131, tid = 0} (gdb) p current_thread->entry.id $4 = {pid = 25228, lwp = 25228, tid = 0} This patch switched current_thread to the thread we are doing step-over in finish_step_over. gdb/gdbserver: 2016-06-17 Yao Qi <yao.qi@linaro.org> * linux-low.c (maybe_hw_step): New function. (linux_resume_one_lwp_throw): Call maybe_hw_step. (finish_step_over): Switch current_thread to lwp temporarily, and assert has_reinsert_breakpoints returns true. (proceed_one_lwp): Call maybe_hw_step. * mem-break.c (has_reinsert_breakpoints): New function. * mem-break.h (has_reinsert_breakpoints): Declare.
Diffstat (limited to 'gdb/gdbserver/ChangeLog')
-rw-r--r--gdb/gdbserver/ChangeLog10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 079507a..70f64ff 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,13 @@
+2016-06-17 Yao Qi <yao.qi@linaro.org>
+
+ * linux-low.c (maybe_hw_step): New function.
+ (linux_resume_one_lwp_throw): Call maybe_hw_step.
+ (finish_step_over): Switch current_thread to lwp temporarily,
+ and assert has_reinsert_breakpoints returns true.
+ (proceed_one_lwp): Call maybe_hw_step.
+ * mem-break.c (has_reinsert_breakpoints): New function.
+ * mem-break.h (has_reinsert_breakpoints): Declare.
+
2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
* win32-low.c (win32_create_inferior): Add pointer casts for C++.