Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit/AIX] Fix error happening while loading a core file
@ 2009-03-15 20:37 Joel Brobecker
  2009-03-15 21:18 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Brobecker @ 2009-03-15 20:37 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

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

[-- Attachment #2: rs6000-nat.diff --]
[-- Type: text/x-diff, Size: 452 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-15 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-15 20:37 [commit/AIX] Fix error happening while loading a core file Joel Brobecker
2009-03-15 21:18 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox