public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* set breakpoints in remote debugging
       [not found] <20051102171409.M10763@eos.cs.nthu.edu.tw>
@ 2005-11-02 17:34 ` fzchuan
  2005-11-02 17:36   ` Daniel Jacobowitz
  2005-11-02 17:37   ` Paul Koning
  0 siblings, 2 replies; 3+ messages in thread
From: fzchuan @ 2005-11-02 17:34 UTC (permalink / raw)
  To: gdb


Hi all:

I encountered some problems in GDB remote debugging.
In most of time, GDB host would send correct breakpoint address to target which 
I asked it. But sometimes it would send strange address.
That is,in GDB host side,I set breakpoint on some address,i.e.:
(gdb)b *0x8

Then, in target side, target will receive the request. 
I print the message received from GDB host,
and it shows that GDB ask target to stop at 0xc6

I use GDB disassemble to query 0x8, and is shows that it is a Call (JUMP)
instruction and jump target address is 0xc6.

Why? thanks

Pin-Chuan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: set breakpoints in remote debugging
  2005-11-02 17:34 ` set breakpoints in remote debugging fzchuan
@ 2005-11-02 17:36   ` Daniel Jacobowitz
  2005-11-02 17:37   ` Paul Koning
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-11-02 17:36 UTC (permalink / raw)
  To: fzchuan; +Cc: gdb

On Thu, Nov 03, 2005 at 01:34:48AM +0800, fzchuan wrote:
> 
> Hi all:
> 
> I encountered some problems in GDB remote debugging.
> In most of time, GDB host would send correct breakpoint address to target which 
> I asked it. But sometimes it would send strange address.
> That is,in GDB host side,I set breakpoint on some address,i.e.:
> (gdb)b *0x8
> 
> Then, in target side, target will receive the request. 
> I print the message received from GDB host,
> and it shows that GDB ask target to stop at 0xc6
> 
> I use GDB disassemble to query 0x8, and is shows that it is a Call (JUMP)
> instruction and jump target address is 0xc6.
> 
> Why? thanks

There is not enough information to answer your question.  When does
this happen?  What does the remote protocol and GDB console show when
it does?  What target is this?

-- 
Daniel Jacobowitz
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: set breakpoints in remote debugging
  2005-11-02 17:34 ` set breakpoints in remote debugging fzchuan
  2005-11-02 17:36   ` Daniel Jacobowitz
@ 2005-11-02 17:37   ` Paul Koning
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Koning @ 2005-11-02 17:37 UTC (permalink / raw)
  To: fzchuan; +Cc: gdb

>>>>> "fzchuan" == fzchuan  <fzchuan@eos.cs.nthu.edu.tw> writes:

 fzchuan> Hi all:

 fzchuan> I encountered some problems in GDB remote debugging.  In
 fzchuan> most of time, GDB host would send correct breakpoint address
 fzchuan> to target which I asked it. But sometimes it would send
 fzchuan> strange address.  That is,in GDB host side,I set breakpoint
 fzchuan> on some address,i.e.: (gdb)b *0x8

 fzchuan> Then, in target side, target will receive the request. I
 fzchuan> print the message received from GDB host, and it shows that
 fzchuan> GDB ask target to stop at 0xc6

 fzchuan> I use GDB disassemble to query 0x8, and is shows that it is
 fzchuan> a Call (JUMP) instruction and jump target address is 0xc6.

 fzchuan> Why? thanks

You probably did a step command.  Step is usually done by setting a
breakpoint at the address after the instruction.  For jumps, that
"next" address is the target address.

       paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-02 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20051102171409.M10763@eos.cs.nthu.edu.tw>
2005-11-02 17:34 ` set breakpoints in remote debugging fzchuan
2005-11-02 17:36   ` Daniel Jacobowitz
2005-11-02 17:37   ` Paul Koning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).