This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: tdep/1089: gdb HC11/HC12 crashes after info frame command
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 26 Feb 2003 21:08:00 -0000
- Subject: Re: tdep/1089: gdb HC11/HC12 crashes after info frame command
- Reply-to: Andrew Cagney <ac131313 at redhat dot com>
The following reply was made to PR tdep/1089; it has been noted by GNATS.
From: Andrew Cagney <ac131313 at redhat dot com>
To: Stephane Carrez <stcarrez at nerim dot fr>
Cc: Stephane dot Carrez at nerim dot fr, gdb-gnats at sources dot redhat dot com
Subject: Re: tdep/1089: gdb HC11/HC12 crashes after info frame command
Date: Wed, 26 Feb 2003 16:03:02 -0500
Can you here do a:
(gdb) set debug frame 1
(I just added this command)
> (gdb) b main
> Breakpoint 1 at 0x4410: file /opt/gnu/gdb-main-integrate/gdb/testsuite/gdb.asm/asmsrc1.s, line 25.
> (gdb) run
> Starting program: /build/fsf-m68hc11/gdb-m6811-tui/gdb/testsuite/gdb.asm/asm-source
>
> Breakpoint 1, main () at /opt/gnu/gdb-main-integrate/gdb/testsuite/gdb.asm/asmsrc1.s:29
> 29 gdbasm_several_nops
> Current language: auto; currently asm
You should here see the reason why the unwind failed.
> (gdb) info frame
> Stack frame at 0x0:
> pc = 0x4410 in main (/opt/gnu/gdb-main-integrate/gdb/testsuite/gdb.asm/asmsrc1.s:29);
> saved pc 0x4410
> source language asm.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0811ded4 in m68hc11_frame_args_address (frame=0x82ae218)
> at /opt/gnu/gdb-main-integrate/gdb/m68hc11-tdep.c:413
> 413 addr = get_frame_base (frame) + get_frame_extra_info (frame)->size + STACK_CORRECTION + 2;
> (gdb) p *frame
> $1 = {frame = 0, pc = 17424, level = -1, type = NORMAL_FRAME, saved_regs = 0x0, extra_info = 0x0,
>
> *********** BUG: extra_info is null in frame
>
> context = 0x0, unwind_cache = 0x82ae25c, unwind = 0x82091e8, pc_unwind_cache_p = 1,
> pc_unwind_cache = 17424, id_unwind_cache_p = 0, id_unwind_cache = {base = 0, pc = 0},
> next = 0x82ae218, prev_p = 1, prev = 0x0}
Two problems:
- For some reason GDB is failing to create the inner-most frame from the
sentinel frame - the above is an assembler file. That leads to your
code being handed a sentinel frame (doing an init_extra_frame_info on
that doesn't make sense). The funtction get_prev_frame() is doing this
and hopefully `set debug frame 1' will let us know where.
- The info frame code should be better at handling sentinel frames. But
lets not worry about that.
Andrew