This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PR23425, unresolved symbol diagnostic
- From: Tom Tromey <tom at tromey dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org, gdb-patches at sourceware dot org
- Date: Tue, 11 Sep 2018 10:04:07 -0600
- Subject: Re: PR23425, unresolved symbol diagnostic
- References: <20180907195832.5423-1-hjl.tools@gmail.com> <20180911021757.GE3174@bubble.grove.modra.org> <CAMe9rOrPWjkmOHVhArD2LWNshQH2DhD+wZvXCNn2g-CSOQ9-5w@mail.gmail.com> <20180911151714.GH3174@bubble.grove.modra.org>
>>>>> "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.
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.
Tom