From: Mathieu Lacage <Mathieu.Lacage@sophia.inria.fr>
To: Wang Yi <leonidwang@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Use debug registers directly in programs?
Date: Tue, 03 Apr 2007 07:32:00 -0000 [thread overview]
Message-ID: <1175585450.3988.167.camel@garfield.inria.fr> (raw)
In-Reply-To: <ac94cb270704030013w133a0022i53c61bcfd15d6bac@mail.gmail.com>
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
--
next prev parent reply other threads:[~2007-04-03 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 7:13 Wang Yi
2007-04-03 7:32 ` Mathieu Lacage [this message]
2007-04-03 19:52 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1175585450.3988.167.camel@garfield.inria.fr \
--to=mathieu.lacage@sophia.inria.fr \
--cc=gdb@sourceware.org \
--cc=leonidwang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox