From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8924 invoked by alias); 21 Mar 2002 17:18:56 -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 8875 invoked from network); 21 Mar 2002 17:18:55 -0000 Received: from unknown (HELO smtp1.videologic.co.uk) (194.200.65.10) by sources.redhat.com with SMTP; 21 Mar 2002 17:18:55 -0000 Received: by smtp1.videologic.co.uk with Internet Mail Service (5.5.2653.19) id ; Thu, 21 Mar 2002 17:18:52 -0000 Message-ID: From: Kiranmaye Gannabathula To: "'gdb@sources.redhat.com'" Subject: Static variables incorrect address Date: Thu, 21 Mar 2002 09:18:00 -0000 X-Mailer: Internet Mail Service (5.5.2653.19) X-SW-Source: 2002-03/txt/msg00181.txt.bz2 Hello, I have a problem with the global static variables in gdb. For a C program as below static int Data = 9; int Func1(void) { return Data; } if i compile this with debug info and run it under gdb, when i breakpoint on the variable Data and try to print its value i get some value and if i look at the address p /x Data i get some invalid address. Can anyone please help me with this Thanks Kiran.