aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2008-06-22 23:04:04 +0000
committerMichael Snyder <msnyder@vmware.com>2008-06-22 23:04:04 +0000
commit682f50897cb34bbc8976758836c511b63a042f90 (patch)
tree42ac8821914ddc32517429ed97b23226adc6c6fe
parent9a943f6ec34b032f95a14a0ac8f1d8304933885e (diff)
downloadfsf-binutils-gdb-682f50897cb34bbc8976758836c511b63a042f90.zip
fsf-binutils-gdb-682f50897cb34bbc8976758836c511b63a042f90.tar.gz
fsf-binutils-gdb-682f50897cb34bbc8976758836c511b63a042f90.tar.bz2
2008-06-21 Michael Snyder <msnyder@specifix.com>
* gdbfreeplay-back.c (handle_special_case): No need to re-compose a T packet (with doctored PC) on any stop signal except SIGTRAP.
-rw-r--r--gdb/gdbserver/ChangeLog3
-rw-r--r--gdb/gdbserver/gdbfreeplay-back.c18
2 files changed, 14 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index d04cb3c..863c6cc 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,8 @@
2008-06-21 Michael Snyder <msnyder@specifix.com>
+ * gdbfreeplay-back.c (handle_special_case): No need to re-compose
+ a T packet (with doctored PC) on any stop signal except SIGTRAP.
+
Fix stepping/breakpoint off-by-one issues.
* gdbfreeplay-back.c (freeplay_find_event): Fix off-by-one error
on last_cached_frame.
diff --git a/gdb/gdbserver/gdbfreeplay-back.c b/gdb/gdbserver/gdbfreeplay-back.c
index d3aa0f5..801bd14 100644
--- a/gdb/gdbserver/gdbfreeplay-back.c
+++ b/gdb/gdbserver/gdbfreeplay-back.c
@@ -806,15 +806,17 @@ handle_special_case (FILE *infile, int fd, char *request)
/* Find the original event message for this stop event. */
fseek (infile, stopframe[cur_frame].eventpos, SEEK_SET);
fgets (inbuf, sizeof (inbuf), infile);
- /* If it's a "$T", give the target a chance to re-compose it
- (possibly allowing for DECR_PC_AFTER_BREAK). */
- if ((p = strstr (inbuf, "$T")) != NULL)
+
+ /* If it's a "$T05" (SIGTRAP), give the target a chance to
+ re-compose it (possibly allowing for DECR_PC_AFTER_BREAK).
+ */
+ if ((p = strstr (inbuf, "$T05")) != NULL)
return add_checksum (target_compose_T_packet (p,
stopframe[cur_frame].pc,
next_event_frame == -1 ?
0 :
1 /* breakpoint_p */));
- /* If it's a "$S", just return it (FIXME?) */
+ /* Otherwise, just return it. */
else
return &inbuf[0];
}
@@ -846,9 +848,11 @@ handle_special_case (FILE *infile, int fd, char *request)
/* Find the original event message for this stop event. */
fseek (infile, stopframe[cur_frame].eventpos, SEEK_SET);
fgets (inbuf, sizeof (inbuf), infile);
- /* If it's a "$T", give the target a chance to re-compose it
- (possibly allowing for DECR_PC_AFTER_BREAK). */
- if ((p = strstr (inbuf, "$T")) != NULL)
+
+ /* If it's a "$T05" (SIGTRAP, give the target a chance to
+ re-compose it (possibly allowing for DECR_PC_AFTER_BREAK).
+ */
+ if ((p = strstr (inbuf, "$T05")) != NULL)
return add_checksum (target_compose_T_packet (p,
stopframe[cur_frame].pc,
next_event_frame == -1 ?