This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Single-stepping through INT nn instructions
- To: Eli Zaretskii <eliz@delorie.com>
- Subject: Re: Single-stepping through INT nn instructions
- From: Jim Blandy <jimb@cygnus.com>
- Date: 14 Jul 1999 18:40:49 -0500
- Cc: gdb@sourceware.cygnus.com, DJ Delorie <dj@delorie.com>
- References: <199907140747.DAA03375@indy.delorie.com>
> I'm not sure if this is the right forum to discuss the above; if not,
> please tell me where to post.
I think this is best for gdb@sourceware.cygnus.com. I've changed the
CC'd address.
> The INT nn and INTO instructions reset the trace bit on x86. So if
> you are single-stepping through a function that issues these
> instructions, the single-step mode is effectively turned off when you
> step over one of them.
So you're trying to step *into* an int, not over it, right? It seems
to me that the TF flag ought to work for stepping over an int.
The pentium manual says:
The INT instructions, however, do clear the TF flag. Therefore,
software debuggers which single-step code must recognize and
emulate INT n or INTO instructions rather than executing them
directly.
You might look into defining SOFTWARE_SINGLE_STEP for i386; it could
check the next instruction, emulate INT n and INTO, and use the TF
flag for all others.
Are you sure the other platforms can do this? I bet they just punt.