This is the mail archive of the gdb@sources.redhat.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]
Other format: [Raw text]

Re: x86 hardware breakpoint question


At 20:10 16/11/01 -0500, Christopher Faylor wrote:
>On Fri, Nov 16, 2001 at 05:57:04PM -0500, DJ Delorie wrote:
>>
>>>   So I am surprised to hear that win32
>>> lets you set debug registers, but if that works, great!
>>
>>I don't know if it works, I just looked it up in the documentation.
>>
>>>  Are the debug registers process wide or
>>> thread specific in that case ?
>>
>>Well, it is Set*Thread*Context.
>
>Which is, conveniently enough, what gdb is already using.  :-)
>
>Did you find specific documentation on the hardware registers, though?
>
>I see this in the system header:
>
>    BYTE    ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
>
>but I don't see any description about how to use them.

  No, these are for xmme registers of Pentium III
or possibly other registers of other kind of i386 compatible regs.

  The debug registers are DR0-3 DR6 and DR7.

DR0 to 3 are the four linear addresses watchpoints
and DR6 and DR7 are used for indicating type and size of
the different breakpoints.

  I think that DJ expects that we can directly write
the values of the DR registers using  SetThreadContext.
This needs to be tested.

ContextFlags field of context structure must contain
CONTEXT_DEBUG_REGISTERS which isn't yet included into 
CONTEXT_DEBUG used in win32-nat code.



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