From: Pedro Alves <pedro_alves@portugalmail.pt>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [commit/AIX] Fix error when loading core file
Date: Sun, 20 May 2007 15:50:00 -0000 [thread overview]
Message-ID: <46506E03.2090603@portugalmail.pt> (raw)
In-Reply-To: <200705201511.l4KFBlYB015777@d12av02.megacenter.de.ibm.com>
Ulrich Weigand wrote:
> 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.
>
If AIX needs to use native calls to get at the shared libraries list,
perhaps you could also look if the solib-target.c Daniel is pushing
for remote dll support, and see if it would be a good fit for AIX too.
As a quick look it seems so. You would move aix_current_sos
to the target_ops, and perhaps needs a few other tweaks
(aix_in_dynsym_resolve_code, and aix_solib_create_inferior_hook).
Although he presented it as remote support, it also makes sense
for native win32 debugging, so it may also make sense as native
AIX debugging.
You would need these applied:
http://sourceware.org/ml/gdb-patches/2007-05/msg00140.html
http://sourceware.org/ml/gdb-patches/2007-05/msg00145.html
Cheers,
Pedro Alves
next prev parent reply other threads:[~2007-05-20 15:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-20 0:01 Joel Brobecker
2007-05-20 15:12 ` Ulrich Weigand
2007-05-20 15:50 ` Pedro Alves [this message]
2007-05-20 23:22 ` Pedro Alves
2007-05-21 13:24 ` Ulrich Weigand
2007-05-21 13:32 ` Daniel Jacobowitz
2007-05-28 20:00 ` Ulrich Weigand
2007-05-28 20:52 ` Daniel Jacobowitz
2007-05-31 21:24 ` Ulrich Weigand
2007-05-31 21:43 ` Daniel Jacobowitz
2007-05-22 18:14 ` Joel Brobecker
2007-05-22 23:19 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46506E03.2090603@portugalmail.pt \
--to=pedro_alves@portugalmail.pt \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox