summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2008-06-22 23:04:04 +0000
committerMichael Snyder <msnyder@specifix.com>2008-06-22 23:04:04 +0000
commit9f88852ae77814aba599276e89c53cad50f8b3b7 (patch)
treeff5864d2985c86fc71e5aae40591912b508b1144
parentd6bb4bf4535fa059bb3a38cebf937806b882bf79 (diff)
downloadgdb-9f88852ae77814aba599276e89c53cad50f8b3b7.tar.gz
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 d04cb3caf93..863c6cc9311 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 d3aa0f59895..801bd1417d6 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 ?