This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Set the stepping range from the function@PC, not@stop_pc.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pedro at codesourcery dot com (Pedro Alves)
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 5 Dec 2008 21:30:38 +0100 (CET)
- Subject: 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