From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: fix bug when debugging prelink'd library
Date: Mon, 12 Jul 2010 21:22:00 -0000 [thread overview]
Message-ID: <20100712212207.GA12165@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <m3zkxwv29e.fsf@fleche.redhat.com>
On Mon, 12 Jul 2010 23:06:21 +0200, Tom Tromey wrote:
> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
>
> Tom> It does mean we need 3 new accessors, which is ugly. OTOH, I found
> Tom> that we use the objfile's name in locexpr_describe_location_piece,
> Tom> and there I think we also want the master objfile.
>
> We only need 1 new accessor -- using the master objfile is ok for the
> other uses.
Yes, I like the patch this way.
Thanks,
Jan
> --- a/gdb/dwarf2loc.h
> +++ b/gdb/dwarf2loc.h
> -/* Return the OBJFILE associated with the compilation unit CU. */
> +/* Return the OBJFILE associated with the compilation unit CU. If CU
> + came from a separate debuginfo file, then the master objfile is
> + returned. */
> struct objfile *dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu);
The same comment needs to be updated at the function definition in
dwarf2read.c.
> +/* Return the text offset for CU. */
> +CORE_ADDR dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *cu);
+
> +/* Return the text offset of the CU. */
Suggesting to extend the comment:
This returned offset is specific to this CU's debug info objfile and it may
be different from the SEPARATE_DEBUG_OBJFILE_BACKLINK objfile offsets.
> +CORE_ADDR
> +dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *per_cu)
> +{
> + struct objfile *objfile = per_cu->psymtab->objfile;
> +
> + return ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
> +}
next prev parent reply other threads:[~2010-07-12 21:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 19:34 Tom Tromey
2010-07-12 19:47 ` Jan Kratochvil
2010-07-12 20:24 ` Tom Tromey
2010-07-12 21:06 ` Tom Tromey
2010-07-12 21:22 ` Jan Kratochvil [this message]
2010-07-13 15:08 ` Tom Tromey
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=20100712212207.GA12165@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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