Bug 145495

Summary: support user-supplied file telling kdevelop how to print custom types
Product: [Applications] kdevelop Reporter: Rob L <robert.leathley>
Component: CPP DebuggerAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: wishlist CC: niko.sams
Priority: NOR    
Version: 3.4.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Rob L 2007-05-16 12:06:03 UTC
Version:           3.4.0.2 (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
Compiler:          gcc (GCC) 4.1.0 
OS:                Linux

I just get "..." next to the variable name in the tree.  If expand the node in the tree, I can see the first character of the string under _M_p->*_M_p.  If I 'p stringName' in the gdb tab, I get the full string amongst the output:

$77 = {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<No data fields>}, _M_p = 0x82c7b64 "temperature"}, static _S_empty_rep_storage = {0, 0, 66, 0}}

I'm sure I have seen this working in previous versions of kdevelop, and the values of QStrings are shown correctly instead of "..."

I'm using gdb 6.5, gcc (GCC) 3.3.3 c++
Comment 1 Amilcar do Carmo Lucas 2007-05-16 12:33:11 UTC
Please update to GDB 6.6 and KDevelop 3.4.1.
RPMs for both software versions can be found here:
http://www.kdevelop.org/index.html?filename=3.4/download.html
Comment 2 Rob L 2007-05-16 12:47:43 UTC
same problem with GDB 6.6 and KDevelop 3.4.1
Comment 3 Andreas Pakulat 2007-05-16 13:03:13 UTC
This won't be fixed in KDevelop3 unless you provide a patch to do so (there are some special cases for QString somewhere in the debugger, the std::string case would have to look similar). For KDevelop4 we're planning to allow users to extend these special cases to add ways to print any type they want to.
Comment 4 Rob L 2007-05-16 13:09:44 UTC
Does that mean it has never worked for std::string?  I was thinking maybe the internals of std::string had changed and kdevelop didn't know about them (or maybe I'm using an older std::string than you expect)?

The user cases in KDevelop4 sounds very useful:)
Comment 5 Andreas Pakulat 2007-05-16 13:56:35 UTC
Right, std::string was never displayed properly.
Comment 6 Andreas Pakulat 2008-07-06 21:10:45 UTC
This is a wishlist item rather than a bug, about allowing to specify  how to print certain types by a user-supplied file.
Comment 7 Niko Sams 2009-07-26 22:41:26 UTC
This is supported using gdb's python pretty printing scripts.