1752747 Members
4758 Online
108789 Solutions
New Discussion юеВ

problems with wdb 5.0

 
Michael Koops_1
Advisor

problems with wdb 5.0

hi

i use wdb 5.0 on a zx6000/hp-ux 11.2.
problem:
(gdb) p r[2]
cannot subscript something of type `DVector'

(r is of type DVector (C++-class with userdefined operator [ ]), according to 'debugging with gdb' this should work)

(gdb) p *(r.vec+2)
$1 = 5

works fine, but isn't that comfortable.

any ideas?

thanks for your help
5 REPLIES 5

Re: problems with wdb 5.0

This looks like a defect in gdb. We will work on fixing this and let you know when the fix will be available. Can you contact your service center to raise a defect for this?

Himabindu Vuppula
WDB Team
Michael Koops_1
Advisor

Re: problems with wdb 5.0

thank you for your reply.

some additional hints:

1. compiling the same code with gcc 3.4.3 instead of aCC leads to the following output:

(gdb) p r[2]
$1 = (double &) @0x0: Error accessing memory address 0x0: Invalid argument.

2. doing the same on a suse9.1/athlon64-machine with gcc 3.3.3 and gdb 6.1 (ddd gui) gives

(gdb) p r[2]
$1 = (double &) @0x2018cc8: 5

so everything works as it should on a newer (?) gdb version.

i hope this helps
Michael

Re: problems with wdb 5.0

When you said "compiling the same code with gcc 3.4.3 instead of aCC leads to the following output", I assume you are using open source FSF gdb to get this output, not the HP's version of gdb that's available from www.hp.com/go/wdb.

FSF gdb and HP gdb have diverged a long time ago. This problem might have been fixed in FSF gdb. We have to get this fix into HP's gdb.

Michael Koops_1
Advisor

Re: problems with wdb 5.0

no, i used wdb (=HP gdb)

Re: problems with wdb 5.0

You are right! Must be something about the compiler's generation of debug info. We will look into this.

Himabindu Vuppula
WDB Team