This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Missing new inferior notification for core files
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: <gdb at sourceware dot org>
- Date: Tue, 5 May 2009 16:15:23 -0400
- Subject: Missing new inferior notification for core files
Hi,
with HEAD of April 30th, I noticed that there is no notification
of a new inferior when connecting to a core file. This is on Linux.
Note that the session below uses MI, but I also tried
plain CLI and used 'set print inferior-events 1';
in that case still, no [New inferior ] event was shown.
So, inferior.c#add_inferior() does not seem to get called for a core
file.
This causes a problem for DSF-GDB because it is not made
aware that a new inferior must be shown to the user.
Maybe this is a simple fix that can get in before branch time for 7.0?
Thanks in advance
marc
~"GNU gdb (GDB) 6.8.50.20090430-cvs\n"
~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law. Type \"show
copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\".\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>...\n"
(gdb)
info inferior
&"info inferior\n"
^done
== No inferiors yet, ok ==
(gdb)
target core /local/home/lmckhou/core.28170
&"target core /local/home/lmckhou/core.28170\n"
=thread-created,id="1",group-id="1"
== thread-created event, but no thread-group-created event ==
&"warning: Can't read pathname for load map: Input/output error.\n"
=library-loaded,id="/lib/libpthread.so.0",target-name="/lib/libpthread.s
o.0",host-name="/lib/libpthread.so.0",symbols-loaded="0"
=library-loaded,id="/usr/lib/libstdc++.so.6",target-name="/usr/lib/libst
dc++.so.6",host-name="/usr/lib/libstdc++.so.6",symbols-loaded="0"
=library-loaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-na
me="/lib/libm.so.6",symbols-loaded="0"
=library-loaded,id="/lib/libgcc_s.so.1",target-name="/lib/libgcc_s.so.1"
,host-name="/lib/libgcc_s.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-na
me="/lib/libc.so.6",symbols-loaded="0"
=library-loaded,id="/lib/ld-linux.so.2",target-name="/lib/ld-linux.so.2"
,host-name="/lib/ld-linux.so.2",symbols-loaded="0"
~"Reading symbols from /lib/libpthread.so.0..."
~"done.\n"
~"Loaded symbols for /lib/libpthread.so.0\n"
~"Reading symbols from /usr/lib/libstdc++.so.6..."
~"done.\n"
~"Loaded symbols for /usr/lib/libstdc++.so.6\n"
~"Reading symbols from /lib/libm.so.6..."
~"done.\n"
~"Loaded symbols for /lib/libm.so.6\n"
~"Reading symbols from /lib/libgcc_s.so.1..."
~"done.\n"
~"Loaded symbols for /lib/libgcc_s.so.1\n"
~"Reading symbols from /lib/libc.so.6..."
~"done.\n"
~"Loaded symbols for /lib/libc.so.6\n"
~"Reading symbols from /lib/ld-linux.so.2..."
~"done.\n"
~"Loaded symbols for /lib/ld-linux.so.2\n"
&"Failed to read a valid object file image from memory.\n"
~"Core was generated by
`/local/home/lmckhou/runtime-TestDSF/DSFTEstApp/Debug/DSFTEstApp'.\n"
~"Program terminated with signal 5, Trace/breakpoint trap.\n"
~"#0 main () at ../testapp.cc:503\n"
~"503\t\tint de = 99;\n"
^done
(gdb)
info inferior
&"info inferior\n"
~"* 1 1\n"
^done
== Inferior is in the list (granted, it is a special one) ==
== but there was no event for its addition ==
(gdb)
-gdb-exit
^exit
=thread-group-exited,id="1"
== thread-group-exited event but no corresponding ==
== thread-group created before ==
=library-unloaded,id="/lib/libpthread.so.0",target-name="/lib/libpthread
.so.0",host-name="/lib/libpthread.so.0"
=library-unloaded,id="/usr/lib/libstdc++.so.6",target-name="/usr/lib/lib
stdc++.so.6",host-name="/usr/lib/libstdc++.so.6"
=library-unloaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-
name="/lib/libm.so.6"
=library-unloaded,id="/lib/libgcc_s.so.1",target-name="/lib/libgcc_s.so.
1",host-name="/lib/libgcc_s.so.1"
=library-unloaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-
name="/lib/libc.so.6"
=library-unloaded,id="/lib/ld-linux.so.2",target-name="/lib/ld-linux.so.
2",host-name="/lib/ld-linux.so.2"