Use debug registers directly in programs?
Mathieu Lacage
Mathieu.Lacage@sophia.inria.fr
Tue Apr 3 07:32:00 GMT 2007
On Tue, 2007-04-03 at 15:13 +0800, Wang Yi wrote:
> 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?
The only way I know of to set the debug registers is to use ptrace and a
program cannot ptrace itself so, you will always need a third-party
program if only to control the debug registers on your behalf.
Mathieu
--
More information about the Gdb
mailing list