This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/11777] Strange behaviour of gdb.Type.fields
- From: "andre dot poenitz at nokia dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 1 Jul 2010 09:13:06 -0000
- Subject: [Bug python/11777] Strange behaviour of gdb.Type.fields
- References: <20100701072012.11777.andre.poenitz@nokia.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From andre dot poenitz at nokia dot com 2010-07-01 09:13 -------
To reproduce without Qt:
------------------------- snip ------------------------
mkdir x && cd x
echo -e "struct P { P(); int a, b, c, d; }; " > p.h
echo -e "#include \"p.h\"\n P::P() {} " > p.cpp
echo -e "class P; struct X { X(); P *p; };" > x.h
echo -e " #include \"x.h\"\n X::X() {} " > x.cpp
echo -e "#include \"x.h\"\n int main() { X x; }" > main.cpp
g++ -g -shared -o libxp.so x.cpp p.cpp
g++ -g -o x -L. -lxp main.cpp -Wl,-rpath,`pwd`
gdb -ex "b main" -ex "run" -ex "python import gdb" \
-ex 'set confirm off' \
-ex 'python print gdb.parse_and_eval("x")["p"].dereference().type.fields()' \
-ex 'python print
gdb.lookup_type(str(gdb.parse_and_eval("x")["p"].dereference().type)).fields()' \
-ex q \
./x
------------------------- snip ------------------------
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11777
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.