From: Christopher J. Grayce <cgrayce@wasatch.ps.uci.edu>
Subject: Re: gdb can't find command line args
Date: Fri, 1 Aug 1997 22:24:25 -0700 (PDT) [thread overview]
Message-ID: <5159802c2d6791d9320cfdae9e39a3a3.axp-list@archive.invalid> (raw)
In-Reply-To: <Pine.LNX.3.95.970801103025.11208A-100000@nexus.carleton.ca>
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
next parent reply other threads:[~1997-08-02 5:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.3.95.970801103025.11208A-100000@nexus.carleton.ca>
1997-08-02 5:24 ` Christopher J. Grayce [this message]
1997-07-31 21:06 gdb can't find command line args Christopher J. Grayce
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox