From 1ba0a4eebc1439600bcfa5077d568a86f648201d Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Sun, 15 Mar 2009 20:26:11 +0000 Subject: [PATCH] Fix an error happening while loading symbols from a core file (on AIX). * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution to detect whether we're debugging a core file or not. --- gdb/ChangeLog | 8 ++++++++ gdb/rs6000-nat.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6d00bf38e62..55af3ec0eed 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2009-03-15 Joel Brobecker + + Fix an error happening while loading symbols from a core file + (on AIX). + + * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution + to detect whether we're debugging a core file or not. + 2009-03-15 Joel Brobecker Modernize the aix-thread later by getting rid of the base_target diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 9f8a43f8d1b..52411830e4c 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -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 -- 2.30.2