internal GDB error mourning inferior

David Taylor dtaylor@emc.com
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 127.0.0.1:5432

. kill / exit the gdb server

. back at gdb do:

    target remote 127.0.0.1:5432

again.

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:


    =thread-group-added,id="i1"
    ~"GNU gdb (GDB) 7.6\n"
    ~"Copyright (C) 2013 Free Software Foundation, Inc.\n"
    ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\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"
    ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
    (gdb) 
    target remote localhost:5432
    &"target remote localhost:5432\n"
    ~"Remote debugging using localhost:5432\n"
    =thread-group-started,id="i1",pid="42000"
    =thread-created,id="1",group-id="i1"
    ~"0x00000000 in ?? ()\n"
    *stopped,frame={addr="0x00000000",func="??",args=[]},thread-id="1",stopped-threads="all"
    ^done
    (gdb) 
    target remote localhost:5432
    &"target remote localhost:5432\n"
    =thread-group-exited,id="i1"
    &"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