This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Error while loading core file on mips-irix
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 9 Jan 2010 08:58:35 +0400
- Subject: [commit] Error while loading core file on mips-irix
On mips-irix, GDB reports the following error while loading a core file:
(gdb) core core
Reading symbols from /usr/lib32/libm.so...done.
Loaded symbols for /usr/lib32/libm.so
Reading symbols from /usr/lib32/libc.so.1...done.
Loaded symbols for /usr/lib32/libc.so.1
You can't do that without a process to debug.
This is a familiar issue, as we've seen thing before on other targets
(probably Tru64, for instance).
The problem is yet again in the irix_solib_create_inferior_hook,
where we try to resume the inferior execution in order to reach
the point where all shared libraries have been mapped. This is not
necessary when debugging from a core file. The error comes from
the fact that we attempt a "target_resume", which fails because
the "core" layer does cannot run/resume...
Fixed by simply doing nothing when debugging from a core file.
gdb/ChangeLog:
Error while loading core file on mips-irix.
* solib-irix.c (irix_solib_create_inferior_hook): Do nothing
if debugging from a core file.
--
Joel
gdb/ChangeLog:
Error while loading core file on mips-irix.
* solib-irix.c (irix_solib_create_inferior_hook): Do nothing
if debugging from a core file.
---
gdb/solib-irix.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c
index 4c97263..444e8e4 100644
--- a/gdb/solib-irix.c
+++ b/gdb/solib-irix.c
@@ -449,6 +449,11 @@ irix_solib_create_inferior_hook (void)
if (inf->attach_flag)
return;
+ /* Likewise when debugging from a core file, the shared libraries
+ have already been mapped, so nothing more to do. */
+ if (!target_can_run (¤t_target))
+ return;
+
if (!enable_break ())
{
warning (_("shared library handler failed to enable breakpoint"));
--
1.5.4.3