[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GDB on AIX 4.3.3 and C++ with native xlC
From: |
Alf E. Helseth |
Subject: |
GDB on AIX 4.3.3 and C++ with native xlC |
Date: |
Fri, 24 Nov 2000 10:25:14 +0100 |
Hi !
I am running GDB 5.0 on a IBM AIX 4.3.3 and have C++ code compiled with
the native VisualAge 5.0 development environment using the xlC compiler
to compile C++ code.
I run into problems displaying member variables etc in C++ classes, it
seems somewhat disoriented by the 'this'-pointer.
A small sample:
class CMyClass {
public:
CMyClass() {
m_Mem1 = 0;
}
~CMyClass() { m_Mem1 = -1; }
void Func1()
{
int some_var = 1;
}
void Func2(int in) {
m_Mem1 = in;
}
public:
int m_Mem1;
};
int main (int argc, char **argv)
{
CMyClass myclass;
myclass.Func2(2);
return 0;
}
The GDB output:
0x10001170 in main (argc=1, argv=0x2ff21e10) at main.C:31
(gdb) n
(gdb) s
CMyClass::Func2 (this=0x2ff20cec, in=2) at main.C:20
(gdb) p this
$1 = (struct <unknown> *) 0x2ff20cec
(gdb) p in
$2 = 2
(gdb) p m_mem1
Internal error: `this' is not an aggregate
(gdb) p *this
$3 = <incomplete type>
(gdb)
Does'nt the GDB work with native AIX compiler ?
Debugging C-code works all OK.
Any hints ?
-Alf
- GDB on AIX 4.3.3 and C++ with native xlC,
Alf E. Helseth <=