This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/AIX] Fix error happening while loading a core file
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 15 Mar 2009 16:33:20 -0400
- Subject: [commit/AIX] Fix error happening while loading a core file
This is another regression that I noticed on AIX.
The problem is that we had a check in xcoff_relocate_symtab that
was supposed to detect the case where we're debugging a core file.
The check was based on the inferior ptid being null. I replaced it
with a check against target_has_execution, which seemed more
appropriate.
Is there a routine that performs this check?
2009-03-15 Joel Brobecker <brobecker@adacore.com>
Fix an error happening while loading symbols from a core file.
* rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
to detect whether we're debugging a core file or not.
Tested on powerpc-aix. Checked in.
--
Joel
Index: rs6000-nat.c
===================================================================
--- rs6000-nat.c (revision 146288)
+++ rs6000-nat.c (working copy)
@@ -1036,7 +1036,8 @@ xcoff_relocate_symtab (unsigned int pid)
int ldisize = arch64 ? sizeof (ldi->l64) : sizeof (ldi->l32);
int size;
- if (ptid_equal (inferior_ptid, null_ptid))
+ /* Nothing to do if we are debugging a core file. */
+ if (!target_has_execution)
return;
do