This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes

On 10/30/2015 05:25 AM, Kevin Buettner wrote:
> On Thu, 29 Oct 2015 21:25:09 -0700
> Kevin Buettner <> wrote:
>> Some of the tests in gdb.dwarf2 which use Dwarf::assemble refer to
>> (minimal/linker) symbols created in the course of building a small
>> test program.  Some targets use a prefix such as underscore ("_") on
>> these symbols.  Many of the tests in gdb.dwarf2 do not take this into
>> account.  As a consequence, these tests fail to build, resulting
>> either in failures or untested testcases.
> Several of the .S files in gdb.dwarf2 have the same problem.  E.g.
> when linking the test case for gdb.dwarf2/method-ptr.exp, I see a
> linker error "undefined reference to `main'".  It appears that crt0
> is generating a reference to _main, but the .S file only provides a
> reference to main.
> Any thoughts on what to do about this?

Isn't this being addressed by gdb_target_symbol_prefix_flags in
the existing tests that use it?  E.g., gdb.arch/i386-bp_permanent.c:

#define SYMBOL(str)     SYMBOL_PREFIX #str
#define SYMBOL(str)     #str


#ifdef __x86_64__
    "    .align 8\n"
    SYMBOL (standard) ":\n"

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]