From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4261 invoked by alias); 21 Nov 2007 09:57:59 -0000 Received: (qmail 4252 invoked by uid 22791); 21 Nov 2007 09:57:59 -0000 X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 21 Nov 2007 09:57:44 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IumL0-0008Ap-I5 for gdb@sourceware.org; Wed, 21 Nov 2007 01:57:42 -0800 Message-ID: <13874127.post@talk.nabble.com> Date: Wed, 21 Nov 2007 09:57:00 -0000 From: rimon To: gdb@sourceware.org Subject: gdb problem viewing variables MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: rorni@yahoo.com X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00205.txt.bz2 Hi, I'm using WDB 5.7 on HP Itanium 11.23. 'file' on my executable shows: ELF-32 executable object file - IA64 The problem is with viewing the contents of the variables. Following is a sequence that demonstrates this: HP gdb 5.7 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x. Copyright 1986 - 2001 Free Software Foundation, Inc. Hewlett-Packard Wildebeest 5.7 (based on GDB) is covered by the GNU General Public License. Type "show copying" to see the conditions to change it and/or distribute copies. Type "show warranty" for warranty/support. .. (gdb) stop in main Breakpoint 1 at 0x400c5b0:1: file loader.cpp, line 902 from loader. (gdb) run Starting program: loader Breakpoint 1, main (argc=Error accessing memory address 0xd08: Bad address. ) at loader.cpp:902 902 ll=new LclsLC_Library; (gdb) print argc Error accessing memory address 0xd08: Bad address. (gdb) print &argc $1 = (int *) 0xd08 (gdb) p ll Error accessing memory address 0xcec: Bad address. (gdb) p &ll $1 = (LclsLC_Library **) 0xcec (gdb) See that both the parameter 'argc' and the local variable ll have a problem. Now if I put a breakpoint in a function called by main, and then go up in the stack to main, I CAN see argc. See in the following sequence: Breakpoint 2, Test (ll=Error accessing memory address 0xd28: Bad address. ) at loader.cpp:716 716 long lv,c,err = 0,j,k,ccv; (gdb) where #0 Test (ll=Error accessing memory address 0xd28: Bad address. ) at loader.cpp:716 #1 0x400c8a0:0 in main (argc=0, argv=0x7ffff9b8) at loader.cpp:911 (gdb) up #1 0x400c8a0:0 in main (argc=0, argv=0x7ffff9b8) at loader.cpp:911 911 Test(ll,ts); (gdb) p argc $5 = 0 (gdb) p &argc $6 = (int *) 0x7efff220 (gdb) You may notice though that when I'm in the subprocedure I can't view the parameters of this subprocedure, such as ll . Any ideas? Thanks, RO -- View this message in context: http://www.nabble.com/gdb-problem-viewing-variables-tf4849137.html#a13874127 Sent from the Sourceware - gdb list mailing list archive at Nabble.com.