This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [i386/stabs] Arguments of main on gcc >= 4.1
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Pedro Alves <pedro_alves at portugalmail dot pt>, gdb-patches at sourceware dot org
- Date: Sun, 16 Dec 2007 19:44:44 -0500
- Subject: Re: [i386/stabs] Arguments of main on gcc >= 4.1
- References: <47503C57.6010308@portugalmail.pt> <20071203182540.GB14306@adacore.com>
On Mon, Dec 03, 2007 at 10:25:40AM -0800, Joel Brobecker wrote:
> > E.g.:
> > int main (int argc, char **argv, char **envp);
> >
> > notice the 0, 4, 8:
> >
> > .zero 16
> > .text
> > .stabs "main:F(0,1)",36,0,10,main
> > .stabs "argc:p(0,1)",160,0,9,0
> > .stabs "argv:p(0,16)=*(3,54)",160,0,9,4
> > .stabs "envp:p(0,16)",160,0,9,8
> > .globl main
> > .type main, @function
>
> Looking at your example above, what would work is if GCC was using
> N_LSYM (128) symbols instead of N_PSYM symbols (160).
If it did that, they wouldn't be treated as arguments any more, just
as local variables. I think.
--
Daniel Jacobowitz
CodeSourcery