From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: fix bug when debugging prelink'd library
Date: Mon, 12 Jul 2010 20:24:00 -0000 [thread overview]
Message-ID: <m34og4wir4.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100712194738.GA6846@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Mon, 12 Jul 2010 21:47:38 +0200")
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Tom> This fixes the problem by changing dwarf2_per_cu_objfile to return the
Tom> debuginfo objfile. This appears to be correct for all callers except
Tom> one, which I also updated.
Jan> As I find the API difficult to figure out which variant of `struct
Jan> objfile *' there is I tried to unify it - choosing the variant (A)
Jan> described at:
Jan> [patch 12/15] PIE: Support loading PIEs from core files
Jan> http://sourceware.org/ml/gdb-patches/2009-11/msg00179.html
I agree that one of these approaches is good for generic code in gdb.
(Actually -- I would much prefer a different design, where there is no
ambiguity possible. But that seems like a big refactoring without a big
user-visible benefit.)
Jan> In such case I miss at least some fat comment at
Jan> dwarf2_per_cu_objfile stating it returns non-primary objfile
Jan> variant.
I will do that.
Jan> dwarf2_per_cu_objfile result is in most cases used only for
Jan> get_objfile_arch (should not matter) and
Jan> CORE_ADDR base_offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
Jan> so there could be rather function dwarf2_per_cu_base_offset.
Actually, I think I will do this. It does mean we need 3 new accessors,
which is ugly. OTOH, I found that we use the objfile's name in
locexpr_describe_location_piece, and there I think we also want the
master objfile.
Tom
next prev parent reply other threads:[~2010-07-12 20:24 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 [this message]
2010-07-12 21:06 ` Tom Tromey
2010-07-12 21:22 ` Jan Kratochvil
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=m34og4wir4.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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