This is the mail archive of the gdb-patches@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 the stepping range from the function@PC, not@stop_pc.


Pedro Alves wrote:

> Following up on:
>  http://sourceware.org/ml/gdb-patches/2008-12/msg00100.html
> 
> Here goes.  This addresses this valid use case:
> 
> < stopped at 0x1234, thread 1, (stop_pc == 0x1234) >
>  (gdb) set $pc = 0xf00
>  (gdb) step
> 
> GDB at this point would set the stepping range based on the
> function at 0x1234, but execution was about to resume at 0xf00.
> 
> GDB should instead be setting the stepping range from the
> function at 0xf00.

Thanks!

> I think it's obvious after the discussion, but I'd still like to
> have your approval.  OK?  Any objections?

It might be better to use get_frame_pc (frame) instead of read_pc (),
as we already set up the step_frame_id relative to that frame.  But
this is just a minor preference ...

Otherwise, this looks good to me.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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