internal GDB error mourning inferior

David Taylor
Fri May 24 20:15:00 GMT 2013

In an unmodified gdb 7.6 , unmodified gdb 7.4.1, and a gdb 7.2-ubuntu,
the following sequence of steps will lead to an internal error:

. start up a gdb server listening on local port 5432.

. freshly started gdb, no exec file, type:

    target remote

. kill / exit the gdb server

. back at gdb do:

    target remote


In 7.2-ubuntu it says:

    /build/buildd/gdb-7.2/gdb/target.c:2330: internal-error: could not find a target to follow mourn inferior
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n) y

In 7.6, invoked with -i=mi (this is where the problem was origianlly
noticed), the complete output is:

    ~"GNU gdb (GDB) 7.6\n"
    ~"Copyright (C) 2013 Free Software Foundation, Inc.\n"
    ~"License GPLv3+: GNU GPL version 3 or later <>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
    ~"This GDB was configured as \"--host=i686-pc-linux-gnu --target=x86_64-unknown-linux-gnu\".\nFor bug reporting instructions, please see:\n"
    target remote localhost:5432
    &"target remote localhost:5432\n"
    ~"Remote debugging using localhost:5432\n"
    ~"0x00000000 in ?? ()\n"
    target remote localhost:5432
    &"target remote localhost:5432\n"
    &"Remote connection closed\n"
    Abort (core dumped)

I have not tried it with top of trunk.

If it matters, it was built to be hosted on i686-pc-linux-gnu,
targetting x86_64-unknown-linux-gnu, running on an x86-64 linux box.

[The targets we want to debug are x86-64, but not everyone has a 64 bit
desktop as yet; however, everyone has an Intel based GNU/Linux box.]

More information about the Gdb mailing list