Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Wang Yi" <leonidwang@gmail.com>
To: gdb@sourceware.org
Subject: Use debug registers directly in programs?
Date: Tue, 03 Apr 2007 07:13:00 -0000	[thread overview]
Message-ID: <ac94cb270704030013w133a0022i53c61bcfd15d6bac@mail.gmail.com> (raw)

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


             reply	other threads:[~2007-04-03  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03  7:13 Wang Yi [this message]
2007-04-03  7:32 ` Mathieu Lacage
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=ac94cb270704030013w133a0022i53c61bcfd15d6bac@mail.gmail.com \
    --to=leonidwang@gmail.com \
    --cc=gdb@sourceware.org \
    /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