This is the mail archive of the gdb@sources.redhat.com 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: prob with "next"


On Wed, Mar 24, 2004 at 08:28:43PM +0530, Vineet Sharma, Noida wrote:
> Hi All, 
>          I have some problem with "next" on function calls. My doubts are
> 
> Q1 If my target PC register points to the next instruction(to be executed)
> not the current one, then does the setting 
> 
> 		gdbarch_decr_pc_after_break (gdbarch, 2); (My instruction
> size is 2 bytes)
> 
> is enough to compenstate the "current pc" requirement of gdb ?

No.  GDB expects read_pc() to return the current instruction.  If yours
doesn't, make an appropriate pseudo-register and set that as the PC.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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