Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Some debugging improvements on linux
Some debugging improvements on linux [message #35262] Fri, 27 January 2012 01:45 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi,

tired of seing things like this when debugging on GDB:

{<Upp::Moveable<Upp::String, Upp::AString<Upp::String0> >> = {<Upp::AString<Upp::String0>> = {<Upp::String0> = {<Upp::Moveable<Upp::String0, Upp::EmptyClass>> = {<Upp::EmptyClass> = {<No data fields>}, <No data fields>}, len = 13, s = 0x7fffffffdf70 "a test string", {
          chr = "a test string\000\000\r", ptr = 0x7320747365742061 <Address 0x7320747365742061 out of bounds>, wptr = 0x7320747365742061, 
          qptr = 0x7320747365742061, v = {8289, 25972, 29811, 29472, 29300, 28265, 103, 3328}, w = {1702109281, 1931506803, 1852404340, 
            218103911}, q = {8295758552588623969, 936749166727098996}}, static voidptr = {{refcount = 2, alloc = 0}, {refcount = 0, 
            alloc = 0}}}, <No data fields>}, <No data fields>}, <No data fields>}


Which is all but human-readable, I wrote a small IDE addon to allow embedding of python pretty-printers into debugger; the result above is :

"a test string"


Which is a bit more clear Smile

I'll attach the IDE patches; it's enough to unpack the code in
uppsrc/ide/Debuggers


folder, overwriting the old ones.

I plan to extend python scripts and to make small mods to debugging code to encompass most Upp types.
By now, String and an initial Vector support are embedded.

Ciao

Max
Re: Some debugging improvements on linux [message #35263 is a reply to message #35262] Fri, 27 January 2012 07:09 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Max,

That looks great Cool I'm using pretty printers for STL at work, but it never occurred to me that we could use the same mechanism for U++... Do you have any idea about the compatibility with different gdb versions? I think it should work in gdb 7.0 and newer, but I also remember something important didn't work before 7.4. If 7.0 is the only requirement, it should be safe to add this to U++, as it would work in all currently supported distributions. And it would sure make our life easier Smile

Best regards,
Honza
Re: Some debugging improvements on linux [message #35264 is a reply to message #35263] Fri, 27 January 2012 08:15 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
IIRC pretty-printing is supported from GDB 7.0... I really don't know how many gdb versions are used around.

BTW, I was thinking to go a bit further, rewriting from scratch the GDB interface and using python to communicate from upp to gdb.

That should allow to have a more usable and complete debugger in Linux....

Max
Previous Topic: A couple of requests to help importing source libraries
Next Topic: debugging MSC10x64 or MSC9x64
Goto Forum:
  


Current Time: Fri Apr 19 10:28:44 CEST 2024

Total time taken to generate the page: 0.02914 seconds