[RFC] symtab.c: Change skip_prologue_sal comparison to match main() too
Jan Kratochvil
jan.kratochvil@redhat.com
Wed Mar 14 09:02:00 GMT 2012
On Wed, 14 Mar 2012 00:24:59 +0100, Pedro Alves wrote:
> I'm going to guess this is fallback from physname. The code looked like
> this when it was originally added:
>
> + /* On targets with executable formats that don't have a concept of
> + constructors (ELF with .init has, PE doesn't), gcc emits a call
> + to `__main' in `main' between the prologue and before user
> + code. */
> + if (funfirstline
> + && gdbarch_skip_main_prologue_p (current_gdbarch)
> + && SYMBOL_LINKAGE_NAME (sym)
> + && strcmp (SYMBOL_LINKAGE_NAME (sym), "main") == 0)
>
> And SYMBOL_LINKAGE_NAME (sym) used to be "main" for C++ too.
This is:
regression by physname: PE32 prologue skip vs. static initializers
http://sourceware.org/bugzilla/show_bug.cgi?id=12680
I would welcome also a testcase, though.
Thanks,
Jan
More information about the Gdb-patches
mailing list