aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/ChangeLog
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-05-17 06:47:44 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-05-17 06:47:44 +0000
commitd631c5a779346edc7c826f4cf2d3cc40dd228d4e (patch)
tree0342e8eea574bb43fac81372497507ff9d63f438 /gdb/gdbserver/ChangeLog
parent96f7a20fe9139eecab0d9b845f792498ae14d3ae (diff)
downloadgdb-d631c5a779346edc7c826f4cf2d3cc40dd228d4e.zip
gdb-d631c5a779346edc7c826f4cf2d3cc40dd228d4e.tar.gz
gdb-d631c5a779346edc7c826f4cf2d3cc40dd228d4e.tar.bz2
gdbserver/lynx178: spurious SIG61 signal when resuming inferior.
On ppc-lynx178, resuming the execution of a program after hitting a breakpoint sometimes triggers a spurious SIG61 event: (gdb) cont Continuing. Program received signal SIG61, Real-time event 61. [Switching to Thread 39] 0x10002324 in a_test.task1 (<_task>=0x3ffff774) at a_test.adb:30 30 select -- Task 1 From this point on, continuing again lets the signal kill the program. Using "signal 0" or configuring GDB to discard the signal does not help either, as the program immediately reports the same signal again. What happens is the following: - GDB sends a single-step order to gdbserver: $vCont;s:31 This tells GDBserver to do a step using thread 0x31=49. GDBserver does the step, and thread 49 receives the SIGTRAP indicating that the step has finished. - GDB then sends a "continue", but this time does not specify which thread to continue: $vCont;c GDBserver uses an arbitrary thread's ptid to resume the program's execution (the current_inferior's ptid was chosen for that). See lynx-low.c:lynx_resume: if (ptid_equal (ptid, minus_one_ptid)) ptid = thread_to_gdb_id (current_inferior); So far on all LynxOS platforms, this has been good enough. But not so on LynxOS 178. If the ptid used to resume the execution is not the same as the thread that did the step, we get the weird signal. This patch fixes the problem by saving the ptid of the thread that last caused an event, received during a call to waitpid. The ptid is saved in per-process private data. gdb/gdbserver/ChangeLog: * lynx-low.c (struct process_info_private): New type. (lynx_add_process): New function. (lynx_create_inferior, lynx_attach): Replace calls to add_process by calls to lynx_add_process. (lynx_resume): If PTID is null, then try using current_process()->private->last_wait_event_ptid. Add comments. (lynx_clear_inferiors): Delete. The contents of that function has been inlined in lynx_mourn; (lynx_wait_1): Save the ptid in the process's private data. (lynx_mourn): Free the process' private data. Replace call to lynx_clear_inferiors by call to clear_inferiors.
Diffstat (limited to 'gdb/gdbserver/ChangeLog')
-rw-r--r--gdb/gdbserver/ChangeLog15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index b7fab1c..5cc2c25 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,18 @@
+2013-05-17 Joel Brobecker <brobecker@adacore.com>
+
+ * lynx-low.c (struct process_info_private): New type.
+ (lynx_add_process): New function.
+ (lynx_create_inferior, lynx_attach): Replace calls to
+ add_process by calls to lynx_add_process.
+ (lynx_resume): If PTID is null, then try using
+ current_process()->private->last_wait_event_ptid.
+ Add comments.
+ (lynx_clear_inferiors): Delete. The contents of that function
+ has been inlined in lynx_mourn;
+ (lynx_wait_1): Save the ptid in the process's private data.
+ (lynx_mourn): Free the process' private data. Replace call
+ to lynx_clear_inferiors by call to clear_inferiors.
+
2013-05-17 Yao Qi <yao@codesourcery.com>
* i386-low.c (i386_length_and_rw_bits): Move the comment to