Re: [RFA] mips-tdep.c: Fix inferior function call breakage

Andrew Cagney
2003-01-27T22:59:07Z

Hmm, this a different, but related, stack dump. The old backtrace was
for before the inferior function call had even been started. The below
is for when the target has stopped in the dummy frame code after the
inferior function returns.

Read the next bit bottom up:

> #3 0x080c670c in gdbarch_init_extra_frame_info (gdbarch=0x82d91e0,
> fromleaf=0, frame=0x82ceed8)
> at /ocotillo2/sourceware-mips64/ocotillo-cross-mips64/../src/gdb/gdbarch.c:4422
> #4 0x08106e57 in create_new_frame (addr=1099511626816, pc=268437552)
> at /ocotillo2/sourceware-mips64/ocotillo-cross-mips64/../src/gdb/frame.c:890

2. GDB starts to go wrong with the above call.

However, I've just committed the sentinel-frame patch and
create_new_frame() is no longer called. Instead get_prev_frame() will
call init_extra_frame_info directly (the call goes with a nasty comment
:-)) and, hence, the problem will still occure.

> #5 0x081066b5 in get_current_frame ()
> at /ocotillo2/sourceware-mips64/ocotillo-cross-mips64/../src/gdb/frame.c:506

1. Ok so far.

> #6 0x08089261 in bpstat_stop_status (pc=0x82b2f20, not_a_sw_breakpoint=0)
> at /ocotillo2/sourceware-mips64/ocotillo-cross-mips64/../src/gdb/breakpoint.c:2724
> #7 0x080b621f in handle_inferior_event (ecs=0xbfffee00)
> at /ocotillo2/sourceware-mips64/ocotillo-cross-mips64/../src/gdb/infrun.c:1805

I can see two options:

- Modify get_prev_frame() to not call init extra info when in a dummy
frame. Not to sure about this.

- Modify mips_init_extra_frame_info() to return immediatly when a dummy
frame.

Note that there is ment to be only one call to pc_in_dummy_frame() (in
"frame.c") and even that is going away - I'm going to deprecate that
function.

Andrew