This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] symtab.c: Change skip_prologue_sal comparison to match main() too


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


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