Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* optind
@ 2003-12-10 14:20 Baurjan Ismagulov
  2003-12-10 14:49 ` optind Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Baurjan Ismagulov @ 2003-12-10 14:20 UTC (permalink / raw)
  To: gdb

Hello,

given the following program:

#include <unistd.h>

int main()
{
	printf("%p\n", &optind);
}


I do:

gcc -g a.c
./a.out
nm a.out |grep optind


I see, respectively:

0x80495ac
080495ac B optind@@GLIBC_2.0


After that I do:

gdb a.out
b main
r
p &optind


I see:

$1 = (int *) 0x4014814c,

whereas I expect it to be 080495ac. Naturally, "p optind" displays
another value, too. What is going on?


Thanks in advance,
Baurjan.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-12-11 15:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10 14:20 optind Baurjan Ismagulov
2003-12-10 14:49 ` optind Daniel Jacobowitz
2003-12-10 16:09   ` optind Baurjan Ismagulov
2003-12-10 16:16     ` optind Andreas Schwab
2003-12-10 16:53       ` optind Baurjan Ismagulov
2003-12-10 17:04         ` optind Ian Lance Taylor
2003-12-10 17:17           ` optind Daniel Jacobowitz
2003-12-10 17:37             ` optind Baurjan Ismagulov
2003-12-11 14:10               ` optind Daniel Jacobowitz
2003-12-11 15:11                 ` optind Baurjan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox