Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Nitin Gupta" <nitin.gupta@nevisnetworks.com>
To: "Manoj Verma, Noida" <manojv@noida.hcltech.com>
Cc: <gdb@sources.redhat.com>
Subject: RE: break point command Z0 not supported
Date: Fri, 05 Dec 2003 11:36:00 -0000	[thread overview]
Message-ID: <36993D449C7FA647BF43568E0793AB3E32A63E@nevis_pune_xchg.pune.nevisnetworks.com> (raw)

Hi Manoj,

> 2) The gdb is reading data at some particular location (here 
> 4000acb0 & 8048338)and inserting "cc" at that address. And at 
> the end of 'continue' response it replaces back the original 
> data at that particular address. Is this the standard way of 
> GDB functioning?
> 
The way GDB and many other debuggers work is by this way only. Here is
my understanding of the ways thing happen in general.

You have a breakpoint instruction and whenever a user issues a
breakpoint at a particular location, the dubugger will _replace_ the
instruction at that very location with a breakpoint insn. It saves the
removed insn in its breakpoint table. Now when the CPU hits this
breakpoint insn, a debug exception is raised that is handled by an
appropriate handler. giving control back to GDB. at this point GDB again
_replace_ the breakpoint insn with the original insn held in its
breakpoint table. Then when you give a next or a step, this insn is
executed.
This is valid for targets that have a valid breakpoint insn. For those
not supporting breakpoint insns, alternate code that can just raise a
debug exception is inserted.

Hope this helps.

Thanks and Regards
Nitin Gupta


             reply	other threads:[~2003-12-05 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05 11:36 Nitin Gupta [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-05 11:57 Manoj Verma, Noida
2003-12-05 12:51 ` Mark Salter
2003-12-05  7:03 Manoj Verma, Noida

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=36993D449C7FA647BF43568E0793AB3E32A63E@nevis_pune_xchg.pune.nevisnetworks.com \
    --to=nitin.gupta@nevisnetworks.com \
    --cc=gdb@sources.redhat.com \
    --cc=manojv@noida.hcltech.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