Joel Brobecker wrote:
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.
Yes, if you look at the SOLIB_ADD definition:
#define SOLIB_ADD(a, b, c, d) \
if (PIDGET (inferior_ptid)) \
/* Attach to process. */ \
xcoff_relocate_symtab (PIDGET (inferior_ptid)); \
else \
/* Core file. */ \
xcoff_relocate_core (c);
it is clear that the _symtab version is intended to be called only
in the case of live process.
It looks like something changed to get SOLIB_CREATE_INFERIOR_HOOK
now invoked as well ...
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.
Yes, I noticed that as well. I had already started to do that, but
got side-tracked by other stuff in the meantime. One problem is that
the ldinfo ptrace call that is required to get at the list of loaded
shared libraries is really a native-only call.
I'd thought of defining a TARGET_OBJECT_LDINFO xfer_partial object
that reflects the contents of the ldinfo, and use this in the
implementation of a (platform-independent) solib-aix.c file.
The rs6000 native target and the core file support would need to
be extended to supply that object.