This is the mail archive of the gdb@sourceware.org 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]

Use debug registers directly in programs?


Hi, all
   gdb is a general purpose debugger, it's very strong.
   But on some specific conditions, somebody would like to provide a
mechanism to let the program debug itself. I mean to provide a subset
function of gdb's, such as only use CPU debug registers to set
watchpoints.
   I think combining with code instrumentation, this mechanism will
partially fulfill auto-debug function and save our time.
   The questions are:
   1. Is that feasible to use debug registers in the programs to
debug themselves? I think yes, any confirm?
   2. How to use the debug registers? The IA32 manual talks about
these registers but doesn't tell how to use them, the gdb internals
covers many areas but it is too complex for those who have not written
or read a debugger before. Should I read the gdb source?

Leo


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