This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: set breakpoints in remote debugging


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]