From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27599 invoked by alias); 21 Mar 2002 19:34:23 -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 27543 invoked from network); 21 Mar 2002 19:34:19 -0000 Received: from unknown (HELO frigg.inter.net.il) (192.114.186.16) by sources.redhat.com with SMTP; 21 Mar 2002 19:34:19 -0000 Received: from zaretsky (diup-219-131.inter.net.il [213.8.219.131]) by frigg.inter.net.il (Mirapoint) with ESMTP id BHC71233; Thu, 21 Mar 2002 21:34:05 +0200 (IST) Date: Thu, 21 Mar 2002 11:34:00 -0000 From: "Eli Zaretskii" To: kiranmaye.gannabathula@powervr.com Message-Id: <2593-Thu21Mar2002213023+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: gdb@sources.redhat.com In-reply-to: (message from Kiranmaye Gannabathula on Thu, 21 Mar 2002 17:18:43 -0000) Subject: Re: Static variables incorrect address Reply-to: Eli Zaretskii References: X-SW-Source: 2002-03/txt/msg00183.txt.bz2 > From: Kiranmaye Gannabathula > Date: Thu, 21 Mar 2002 17:18:43 -0000 > > 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. I'm sorry, from your description I cannot figure out exactly what happened. Please post a complete GDB session showing the commands you typed and what GDB printed in response. Also, what version of GDB is that, and on what platforms?