Operating System - Linux
1753444 Members
4760 Online
108794 Solutions
New Discussion юеВ

Problem viewing class types in gdb

 
Sunderjeet Singh
Occasional Contributor

Problem viewing class types in gdb

Hi,

I am trying to debug a C++ code using gdb on HP_UX. When i try to view 'this' pointer, i get the following error:

*****************************************
Internal error: `this' is not an aggregate
*************************************

I am not able to see any data members of class.
Same piece of code is debugged correctly on Linux. Is there any issue with compilation ?

Following are the relevant details:
OS: HP_UX B.11.11 U 9000/800
Compiler: gcc 3.4.2
gdb: HP gdb 5.2 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00

thanks
-Sunderjs
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: Problem viewing class types in gdb

You may want to use a later version, try downloading 5.6.

What does "ptype this" show?
Mithun R N
Advisor

Re: Problem viewing class types in gdb

Hello Sunderjeet,

We were able to reproduce the issue you have mentioned.
This seems to be a problem with gdb and to some extent with g++ on HPUX.
Even 'ptype this' will give the same error.

We are looking into this issue and shall get back to you in sometime.

Having said that, we encourage you to use the HP aCC compiler and leverage complete debugging support.

Regards,
Mithun
HP-WDB team
Sunderjeet Singh
Occasional Contributor

Re: Problem viewing class types in gdb

Hi,

Any update from HP after recreating the problem locally ?

Meanwhile, i am trying to test the same piece of code using g++ 4.1.2 and gdb 5.3
(latest available from HP site).

thanks
-Sunder
Sunderjeet Singh
Occasional Contributor

Re: Problem viewing class types in gdb

Hi,

What are the major differences between compiling with g++ and aCC ? My g++ compiled code gives a lot of errors with aCC (even plain typedef enum is generating error). Is there any information manual that list such differences.

thanks
-Sunder
Dennis Handly
Acclaimed Contributor

Re: Problem viewing class types in gdb

>What are the major differences between compiling with g++ and aCC?

aC++ is strict C++, no extensions.

>My g++ compiled code gives a lot of errors with aCC (even plain typedef enum is generating error). Is there any information manual that list such differences?

What does the code look like?
Check g++ for their list of extensions??