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: [i386/stabs] Arguments of main on gcc >= 4.1


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


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