[i386/stabs] Arguments of main on gcc >= 4.1
Daniel Jacobowitz
drow@false.org
Mon Dec 17 00:47:00 GMT 2007
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
More information about the Gdb-patches
mailing list