This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Patch to fix reverse return from subroutine error
Sorry for late everybody.
Looks like we still have trouble with it,right?
We have plan B for this issue. This is a old implement when p record
still have reverse command inside it.
This issue is because we don't know the frame_info of step_frame_id.
Without it, we cannot get the frame_info of high level function with
function get_prev_frame.
Without frame_info, we cannot get the frame_id.
Then we cannot make sure if this inferior return from subroutine.
So we can save this prev_frame_id when we save step_frame_id in reverse mode.
in step_once,
frame = get_current_frame ();
tp->step_frame_id = get_frame_id (frame);
Update it to inferior_status.
And update it in handle_inferior_event:
ecs->event_thread->step_range_start = stop_pc_sal.pc;
ecs->event_thread->step_range_end = stop_pc_sal.end;
ecs->event_thread->step_frame_id = get_frame_id (frame);
ecs->event_thread->current_line = stop_pc_sal.line;
ecs->event_thread->current_symtab = stop_pc_sal.symtab;
Then, we can use it to make sure if inferior return from subroutine or not.
What do you think about it?
Thanks,
Hui
On Mon, Jun 29, 2009 at 05:08, Daniel Jacobowitz<drow@false.org> wrote:
> On Sun, Jun 28, 2009 at 11:44:37AM -0700, Michael Snyder wrote:
>> Great, I looked up your paper, and found it helpful.
>> Are your gdb patches available online? ?Any head start
>> would be a boon...
>
> I think I've posted them before, but I can't remember where. ?A copy
> is attached. ?The epilogue bits are in patch-4.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>