From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5159802c2d6791d9320cfdae9e39a3a3.axp-list@archive.invalid> X-Archive-Original-Message-ID: Date: Fri, 1 Aug 1997 22:24:25 -0700 (PDT) From: Christopher J. Grayce Subject: Re: gdb can't find command line args In-Reply-To: On Fri, 1 Aug 1997, Maciek Klimkowski wrote: > > > On Thu, 31 Jul 1997, Christopher J. Grayce wrote: > > > Breakpoint 1, main () at silly.c:14 > > 15 printf("argc = %d, argv = %p\n",argc,argv) ; > > (gdb) print argc > > $1 = 0 <------ what?? > > (gdb) print argv > > $2 = (char **) 0x0 <------ excuse me?! > > (gdb) cont > > Continuing. > > argc = 1, argv = 0x11ffffb88 > > hrm i've run it on a solaris, with correct results.. Does the same happen > for every other variable you are trying to inspect? > Yes indeed. *All* variables are looked for at the wrong addresses, which I can tell by having the program print out their addresses and then asking gdb what it thinks they are. Christopher Grayce -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com