This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/commit] ppc-aix core file relocation.
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 15 May 2013 12:05:54 +0100
- Subject: Re: [RFC/commit] ppc-aix core file relocation.
- References: <1368614045-16575-1-git-send-email-brobecker at adacore dot com>
On 05/15/2013 11:34 AM, Joel Brobecker wrote:
> This patch fixes the problem by extending corelow's core_xfer_partial
> into handling the TARGET_OBJECT_LIBRARIES_AIX object. This requires
> that we go through the gdbarch vector rather than just purely the
> target_ops. This means that I needed the code decoding the loader
> info to be in the aix-tdep module, which also forces me to extract
> the data from that loader info by hand. We're lucky, the information
> appears to be stable across platforms.
Thanks! This is definitely the way to go.
> + If CLOSE_LDINFO_FD is nonzero, then this routine also closes
> + the ldinfo_fd file descriptor. This is useful when the ldinfo
> + data is obtained via ptrace, as ptrace opens a file descriptor
> + for each and every entry; but we cannot use this descriptor
> + as the consumer of the XML library list might live in a different
> + process. */
How interesting. So AIX's list is better than glibc in that we
could use that descriptor to avoid the "library file gdb opens is
no longer the same as the inferior opened" issue.
> +
> +LONGEST
> +rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch, const gdb_byte *ldi_buf,
> + gdb_byte *readbuf, ULONGEST offset, LONGEST len,
> + int close_ldinfo_fd)
> +/* A structured representation of one entry read from the ld_info
> + binary data provided by the AIX loader. */
> +
> +struct ld_info
> +{
> + int next;
I'm surprised this is signed.
It was unsigned on Ulrich's version: http://sourceware.org/ml/gdb-patches/2007-05/msg00321.html
Anyway, I skimmed it and it looked good to me.
--
Pedro Alves