Mail Archives: djgpp-workers/1999/09/23/08:13:28
While working on the FSDB bug that Andris reported in this thread, I
found a couple of unrelated problems:
- F8 (step over) doesn't work if it uses INT3 to place a temporary
breakpoint after the function call. To reproduce, set 4 or more
breakpoints in various places of a program (so that FSDB runs out
of debug registers), and then press F8 until you come to a CALL
instruction. You will see an error message when you try to step
over that CALL.
- FSDB didn't know about SIGQUIT.
- The message about unexpected Int 3 was misplaced.
These problems are not new, even v2.01 had them. The patches are
below.
*** src/debug/fsdb/fullscr.c~1 Tue Sep 21 21:46:02 1999
--- src/debug/fsdb/fullscr.c Wed Sep 22 19:55:54 1999
*************** typedef enum { R_Step, R_Step1, R_Over,
*** 1021,1027 ****
static void
step (KIND_TYPE kind)
{
! int i, b, no, len, int03hit;
char *inst = 0;
int tracing = (kind == R_Step1);
word32 final = -1;
--- 1021,1027 ----
static void
step (KIND_TYPE kind)
{
! int i, b = -1, no, len, int03hit;
char *inst = 0;
int tracing = (kind == R_Step1);
word32 final = -1;
*************** step (KIND_TYPE kind)
*** 1103,1109 ****
user_screen ();
b = set_breakpoint (BP_Code, 0, final);
go (1);
- reset_breakpoint (b);
break;
case R_Run:
user_screen ();
--- 1103,1108 ----
*************** step (KIND_TYPE kind)
*** 1123,1128 ****
--- 1122,1129 ----
if ((int03hit = (i == 0x03)
&& get_breakpoint (BP_Code, 0, a_tss.tss_eip - 1) != -1))
a_tss.tss_eip--; /* point back to Int 3 */
+ if (kind == R_Over && b >= 0)
+ reset_breakpoint (b); /* reset only after get_breakpoint did its thing */
if (tracing) return;
/* Find out whether a breakpoint stopped us. */
*************** step (KIND_TYPE kind)
*** 1204,1214 ****
message (CL_Error, "User program used debug registers");
else if (i == 1 && (edi.dr[6] & (1 << 15)))
message (CL_Error, "Task switch caused debug exception");
- else if (i == 3 && !int03hit)
- message (CL_Error, "Unexpected Int 3 hit");
}
else if (i == 0x79 || i == 0x09)
message (CL_Info, "Keyboard interrupt");
else if (i == 0x75)
{
char *reason;
--- 1205,1217 ----
message (CL_Error, "User program used debug registers");
else if (i == 1 && (edi.dr[6] & (1 << 15)))
message (CL_Error, "Task switch caused debug exception");
}
+ else if (i == 3 && !int03hit)
+ message (CL_Error, "Unexpected Int 3 hit");
else if (i == 0x79 || i == 0x09)
message (CL_Info, "Keyboard interrupt");
+ else if (i == 0x7a)
+ message (CL_Info, "QUIT key pressed");
else if (i == 0x75)
{
char *reason;
- Raw text -