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.
/* 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];
}
/* 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 ?