make call to _main() part of the main() ``prologue''

Jason Merrill jason@redhat.com
Wed Jun 2 18:55:00 GMT 2004


On 01 Jun 2004 17:08:15 -0300, Alexandre Oliva <aoliva@redhat.com> wrote:

> GDB gets a bit confused in embedded targets, because the call to
> _main() (or, on powerpc-eabi, __eabi()), goes after the line number
> note that marks the end of the prologue.  This patch arranges for the
> call to be emitted before the note that marks the beginning of the
> function, just like the code that aligns the stack pointer just above
> the patched point, such that, when we set a breakpoint on main() in
> GDB, all global initializers will have already run.

Could you discuss briefly why this is preferable?  In a comment in the
code, as Andreas suggests.

Jason



More information about the Gcc-patches mailing list