public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb problem viewing variables
@ 2007-11-21  9:57 rimon
  2007-11-21 16:37 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: rimon @ 2007-11-21  9:57 UTC (permalink / raw)
  To: gdb


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.

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

* Re: gdb problem viewing variables
  2007-11-21  9:57 gdb problem viewing variables rimon
@ 2007-11-21 16:37 ` Daniel Jacobowitz
  2007-11-25  7:32   ` rimon
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-11-21 16:37 UTC (permalink / raw)
  To: rimon; +Cc: gdb

On Wed, Nov 21, 2007 at 01:57:42AM -0800, rimon wrote:
> 
> Hi,
> 
> I'm using WDB 5.7 on HP Itanium 11.23.

This is not a GDB release; it's based on GDB, but HP have done a lot
of work on it, and it is not based on current GDB sources.  We can't
help you with Wildebeest.

-- 
Daniel Jacobowitz
CodeSourcery

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

* Re: gdb problem viewing variables
  2007-11-21 16:37 ` Daniel Jacobowitz
@ 2007-11-25  7:32   ` rimon
  0 siblings, 0 replies; 3+ messages in thread
From: rimon @ 2007-11-25  7:32 UTC (permalink / raw)
  To: gdb




Daniel Jacobowitz-2 wrote:
> 
> This is not a GDB release; it's based on GDB, but HP have done a lot
> of work on it, and it is not based on current GDB sources.  We can't
> help you with Wildebeest.
> 

Understood.
In case anyone reading this thread is interested - I've been contacted by HP
wdb help.  The source of the problem is that I am compiling with gcc 4.2.1
and they say that "Currently we give minimal support for gcc4.1 and higher
versions.".  Nevertheless they have reproduced the problem and are trying to
help with their beta version - I hope it helps.
-- 
View this message in context: http://www.nabble.com/gdb-problem-viewing-variables-tf4849137.html#a13933425
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.

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

end of thread, other threads:[~2007-11-25  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-21  9:57 gdb problem viewing variables rimon
2007-11-21 16:37 ` Daniel Jacobowitz
2007-11-25  7:32   ` rimon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).