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

Hi Nitin,
Your point is well understood. 

But I have one concern, 
1) If I were to implement the GDB remote serial protocol and want to talk to
'gdbserver', then is this the right way to go for implementing the breapoint
mechanism?
2) Is 'Z0' packet supported for any known target? ( The target I am using is
'arm-linux') 

Thanks.

> -----Original Message-----
> From: Nitin Gupta [mailto:nitin.gupta@nevisnetworks.com]
> Sent: Friday, December 05, 2003 5:06 PM
> To: Manoj Verma, Noida
> Cc: gdb@sources.redhat.com
> Subject: RE: break point command Z0 not supported
> 
> 
> 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:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-05 11:57 Manoj Verma, Noida [this message]
2003-12-05 12:51 ` Mark Salter
  -- strict thread matches above, loose matches on Subject: below --
2003-12-05 11:36 Nitin Gupta
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=1B3885BC15C7024C845AAC78314766C501605F4B@EXCH-01 \
    --to=manojv@noida.hcltech.com \
    --cc=gdb@sources.redhat.com \
    --cc=nitin.gupta@nevisnetworks.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