Package: dwarves
Version: 1.3-1.1
Severity: normal
In C++, a class is exactly the same as a struct, except that the
members are private by default. But a class is represented differently
in the debugging information than a struct.
pahole should be able to handle both, but currently it can only handle
structs.
[bloom@little-cat-a ~]$ cat test.cpp
struct Foo{
int a;
void*c;
int b;
};
[bloom@little-cat-a ~]$ CXXFLAGS=-g make test.o
g++ -g -c -o test.o test.cpp
[bloom@little-cat-a ~]$ pahole test.o
struct Foo {
int a; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
void * c; /* 8 8 */
int b; /* 16 4 */
/* size: 24, cachelines: 1 */
/* sum members: 16, holes: 1, sum holes: 4 */
/* padding: 4 */
/* last cacheline: 24 bytes */
}; /* definitions: 1 */
[bloom@little-cat-a ~]$ cat test.cpp
class Foo{
int a;
void*c;
int b;
};
[bloom@little-cat-a ~]$ CXXFLAGS=-g make test.o
g++ -g -c -o test.o test.cpp
[bloom@little-cat-a ~]$ pahole test.o
die__process_unit: DW_TAG_class_type @ <0x2d> not handled!
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.38-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages dwarves depends on:
ii libc6 2.11.2-13 Embedded GNU C Library: Shared lib
ii libdw1 0.152-1 library that provides access to th
dwarves recommends no packages.
dwarves suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]