[RFC] - Unexpected gdb output after inferior exits in simulator run
Andrew Cagney
cagney@gnu.org
Fri Dec 5 22:07:00 GMT 2003
> However for the mips toolchain case when run using the simulator,
> wait_for_inferior eventually calls a different mourn_inferior:
>
> static void
> gdbsim_mourn_inferior (void)
> {
> if (sr_get_debug ())
> printf_filtered ("gdbsim_mourn_inferior:\n");
> remove_breakpoints ();
> generic_mourn_inferior ();
> }
>
> which does not affect the current target, which remains "sim", and for
> which target_has_stack is always true.
The theory here is that, even though the target "exited", it is still
around vis:
> Program exited normally.
> Current language: auto; currently asm
> (gdb) info registers
> zero at v0 v1 a0 a1 a2 a3
> R0 00000000 00000000 00000000 00000000 00000000 a0024700 00000004 00000004
> t0 t1 t2 t3 t4 t5 t6 t7
> R8 00000000 a002926f 00000004 00000000 a0000000 00000000 a00286dc 80000000
> s0 s1 s2 s3 s4 s5 s6 s7
> R16 ffffffff a0028c20 fffffffc 00000000 a0028ca4 00000000 00000000 00000001
> t8 t9 k0 k1 gp sp s8 ra
> R24 00000002 00000000 00000000 00000000 a0031268 801fffa8 00000000 a00206e4
> sr lo hi bad cause pc
> 20100000 00000007 00002000 00000000 00000000 a0020174
> fsr fir
> 00000000 00000000
> (gdb) bt
> #0 _exit () at /home/scratch/GNUPRO/gnupro/libgloss/mips/crt0.S:267
> #1 0xffffffffa00206e4 in exit (code=0x0)
> at /home/scratch/GNUPRO/gnupro/newlib/libc/stdlib/exit.c:103
So, in a way, that "Current language: ..." message is valid.
Andrew
More information about the Gdb
mailing list