From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: PR23425, unresolved symbol diagnostic
Date: Tue, 11 Sep 2018 16:39:00 -0000 [thread overview]
Message-ID: <f523d5f9-fb78-5c49-a2b9-118d4b265297@redhat.com> (raw)
In-Reply-To: <87worsqavc.fsf@tromey.com>
On 09/11/2018 05:04 PM, Tom Tromey wrote:
>>>>>> "Alan" == Alan Modra <amodra@gmail.com> writes:
>
> Alan> I think this should be OK for all the gdb uses of
> Alan> bfd_simple_get_relocated_section_contents or similar code in
> Alan> compile-object-load.c, but I won't commit this immediately to give gdb
> Alan> folk time to comment.
>
> There should be gdb test cases covering the relocation cases.
Yeah, you can debug an unrelocated .o file directly,
like "file foo.o". The canonical testcase for that, I think is
gdb.base/relocate.exp.
>
> For the compile feature you'll need to make sure your gcc is
> compile-capable and that the needed library and plugin are installed.
>
> However, I believe relocation isn't only used for the compile feature.
> There's this in dwarf2read.c:
>
> /* When debugging .o files, we may need to apply relocations; see
> http://sourceware.org/ml/gdb-patches/2002-04/msg00136.html .
> We never compress sections in .o files, so we only need to
> try this when the section is not compressed. */
> retbuf = symfile_relocate_debug_section (objfile, sectp, buf);
>
> I don't know if there is a test case for this or not -- I'd hope so.
gdb.base/relocate.exp likely covers this.
Thanks,
Pedro Alves
prev parent reply other threads:[~2018-09-11 16:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180907195832.5423-1-hjl.tools@gmail.com>
[not found] ` <20180911021757.GE3174@bubble.grove.modra.org>
[not found] ` <CAMe9rOrPWjkmOHVhArD2LWNshQH2DhD+wZvXCNn2g-CSOQ9-5w@mail.gmail.com>
2018-09-11 15:17 ` Alan Modra
2018-09-11 16:04 ` Tom Tromey
2018-09-11 16:39 ` Pedro Alves [this message]
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=f523d5f9-fb78-5c49-a2b9-118d4b265297@redhat.com \
--to=palves@redhat.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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