From 9f88852ae77814aba599276e89c53cad50f8b3b7 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Sun, 22 Jun 2008 23:04:04 +0000 Subject: 2008-06-21 Michael Snyder * gdbfreeplay-back.c (handle_special_case): No need to re-compose a T packet (with doctored PC) on any stop signal except SIGTRAP. --- gdb/gdbserver/ChangeLog | 3 +++ gdb/gdbserver/gdbfreeplay-back.c | 18 +++++++++++------- 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 + * 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 ? -- cgit v1.2.1