This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Single-stepping through INT nn instructions



> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]