[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Pretty printing in gdb7
|
I've been playing with the DSF-GDB framework (rc3) and a recent build
of gdb7. Together they make a compelling story for debugging C++
binaries with Eclipse.
I'm seeing some problems with the Python pretty printing support. The
pretty printing works well for non-MI commands, but some of the MI
commands are reporting the actual implementation structure while
others report the underlying data. A quick summary:
1) std::string objects work great. No more digging down 3-4 levels of
basic_string structure to get the char* (which sometimes only shows
the first character, so you need to copy the address to a memory view)
2) std::set and std:map objects don't expose their elements. The
"var-list-children" MI command on these objects always returns a value
of "0", making it appear that the set/map is empty.
3) std::vectors cause an internal gdb assertion and exit.
"var-list-children" returns the correct number of elements in the
vector, but "var-info-path-expression var.[N]" commands, which should
return the vector's parameterized type, instead return the vector's
implementation structure. So "var-info-path-expression var.[0]"
returns "std:_Vector_base..." and "var-info-path-expression var.[1]"
asserts because vector only contains a single child member.
Is anyone having any success with gdb7's new pretty printing under the
DSF-GDB framework? Any insight on whether what I am seeing is
requires a gdb fix or can be fixed in the Python scripts for pretty
printing? Or would it be easier to tackle this by modifying DSF-GDB
itself? Any pointers are welcome.
Thanks,
Terry Parker
Google, Inc.