This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/AIX] Fix error when loading core file


Hello,

We noticed the following problem with gdb-6.6 when trying to load
a core file on AIX:

        (gdb) core core
        ptrace ldinfo: No such process.

This is the cause of 2 FAILS in corefile.exp.

I think the problem started when we introduced post_create_inferior.
This causes us to call the SOLIB_CREATE_INFERIOR_HOOK, which in our
case is defined as a call to xcoff_relocate_symtab. I haven't really
checked with older versions of GDB because rebuilding GDB on AIX is
mighty slow, but it very much looks like this function was not called
in the case of core files before. This function is assuming a live process,
not a core file. So what I did was do an early return when debugging
a core file.

What this made me realize, however, is that we should really be
converting the AIX port to using the target_so_ops. I'll try to do
that soon. In the meantime, the attached patch should be good enough.

2007-05-19  Joel Brobecker  <brobecker@adacore.com>

        * rs6000-nat.c (xcoff_relocate_symtab): Do nothing if debugging
        a core file. Add comment in the function description.

Tested on ppc-aix, fixes:

        gdb.base/corefile.exp: args: execfile -core=corefile
        gdb.base/corefile.exp: core-file command

Committed.

-- 
Joel

Attachment: aix-core.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]