From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24689 invoked by alias); 10 Dec 2003 14:20:57 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24676 invoked from network); 10 Dec 2003 14:20:53 -0000 Received: from unknown (HELO ata.cs.hacettepe.edu.tr) (193.140.236.6) by sources.redhat.com with SMTP; 10 Dec 2003 14:20:53 -0000 Received: from ata.cs.hacettepe.edu.tr (ata.cs.hacettepe.edu.tr [127.0.0.1]) by ata.cs.hacettepe.edu.tr (8.12.8/8.11.6) with ESMTP id hBAEKn6P028350 for ; Wed, 10 Dec 2003 16:20:49 +0200 Received: (from ibr@localhost) by ata.cs.hacettepe.edu.tr (8.12.8/8.12.8/Submit) id hBAEKlNT028349 for gdb@sources.redhat.com; Wed, 10 Dec 2003 16:20:47 +0200 Date: Wed, 10 Dec 2003 14:20:00 -0000 From: Baurjan Ismagulov To: gdb@sources.redhat.com Subject: optind Message-ID: <20031210142045.GL23712@ata.cs.hacettepe.edu.tr> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i X-SW-Source: 2003-12/txt/msg00160.txt.bz2 Hello, given the following program: #include 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.