Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: frithjofh on June 25, 2013, 04:37:08 pm

Title: revision of c::b on DrDobbs debbuger comparison
Post by: frithjofh on June 25, 2013, 04:37:08 pm
Hi everybody,

only wanted to point out to whom it may interest, the issue 1307 of Dr. Dobbs Journal holds an article comparing debugging environments on Linux. C::B is on the list of applications included and the text may be of interest to some of the devs...

Greetings from Asturias

frithjofh
Title: Re: revision of c::b on DrDobbs debbuger comparison
Post by: oBFusCATed on June 25, 2013, 04:39:09 pm
Link?
Title: Re: revision of c::b on DrDobbs debbuger comparison
Post by: frithjofh on June 25, 2013, 04:44:01 pm
Oh, I forgot...

http://twimgs.com/ddj/digital/062413/DDJ_1307.pdf (http://twimgs.com/ddj/digital/062413/DDJ_1307.pdf)

I hope this works... if I'm not mistaken one has to sign up to receive the newsletter... but maybe it works. Anyway, the article is very brief and doesn't exactly state how the author gets to his ratings...
Title: Re: revision of c::b on DrDobbs debbuger comparison
Post by: killerbot on June 25, 2013, 06:52:56 pm
we are in the (front of ) the middle of the pack.

A lot of things we know already where we should improve on usability.
A simple example  :  showing the contents of a std::string. Recently noticed we don't show it (even if it is a member of a class), we show some technical struct, where you can then further expand some pointer (the data ) and then you see the contents of the string.
Title: Re: revision of c::b on DrDobbs debbuger comparison
Post by: oBFusCATed on June 25, 2013, 06:54:48 pm
killerbot: Install python enabled gdb and STL pretty printers and it will work...
Title: Re: revision of c::b on DrDobbs debbuger comparison
Post by: killerbot on June 25, 2013, 09:54:30 pm
I think I have installed those things already a zillion times, I will check once again ...

Question : is this still correct : http://wiki.codeblocks.org/index.php?title=Pretty_Printers ?

EDIT : I just checked this on my main machine :
- nothing specified in "Debugger Initialization commands"
- Enable watch scripts : unchecked

and I can see perfectly the members in the below code snippet :

Code
#include <iostream>
#include <vector>
#include <string>
#include <set>


class Foo
{
public:
void doSomething();
private:
std::string mString{"front 242"};
std::vector<std::string> mVecStrings{"no", "shuffle"};
std::vector<int> mVecInts{2, 4, 2};
std::set<int> mSetInts{2, 4};
};

void Foo::doSomething()
{
std::cout << mString << std::endl;
for(auto element : mVecStrings)
{
std::cout << element << std::endl;
}
for(auto element : mVecInts)
{
std::cout << element << std::endl;
}
for(auto element : mSetInts)
{
std::cout << element << std::endl;
}
}

int main()
{
Foo foo;
foo.doSomething();
    return 0;
}

So I did NOT have to do anything as described in the wiki link above.
Title: Re: revision of c::b on DrDobbs debbuger comparison
Post by: oBFusCATed on June 26, 2013, 12:11:38 am
Linux users (of modern distros) have the advantage that all the required packages are preinstalled (gdb is built with python support, libstdc++ has the stl printers and so on).