User forums > General (but related to Code::Blocks)

[OT] unofficial MinGW GDB gdb with python released

<< < (20/35) > >>

ollydbg:
Just a reminder:
Today, Chirs has announced an offcial mingw gdb 7.1 in the mingw maillist:


--- Quote ---I've uploaded a new mingw gdb build created from the vanilla gdb 7.1 sources:

http://sourceforge.net/projects/mingw/files/GNU%20Source-Level%20Debugger/GDB-7.1/gdb-7.1-1-mingw32-bin.tar.gz/download

The sources can be found here:

http://sourceforge.net/projects/mingw/files/GNU%20Source-Level%20Debugger/GDB-7.1/gdb-7.1-src.tar.gz/download

Please report any issues to this mailing list.

Chris
--- End quote ---

I have tested it and found that this one can't debug into a dll source. The same as this bug report and discussion:
Re: [OT] MinGW GDB 7.0 is released

Thanks.

Loaden:

--- Quote from: Loaden on March 19, 2010, 11:30:04 am ---
--- Quote from: ollydbg on March 19, 2010, 04:01:03 am ---I have build this version under Loaden's GCC 4.4.3. I can debug under Codeblocks, but I still have some problems. the major problem is that showing variables in the Watch window of C::B, and the command interpreter runs really slow when I debug the Codecompletion plugin DLL.

--- End quote ---
In here, there is no delay, very fast! :lol:

--- End quote ---
I'm sorry, that my original testing method was wrong, now, I have exprenced the debug lag problem too.( using gdb 7.1)

Here is the instrucntions to reproduce the problem:

1, start debugging
2, set a breakpoint in the parserthread.cpp, line 450
3, add a watch variable: token, which is a wxString
4, when the debugger reach the breakpoint, you will notice the debugger toolbar will disabled for several seconds.
5, then, you will see the token's value in "watch window".
6, you press "step" button in the debugger toolbar.
7, you will notice that the toolbar disabled agian for a few seconds, and the lag happens again.

I have trid the mingw gdb 7.0.1, these is no such time delay probelm.

ollydbg:
Hi, all.

I have successfully built the mingw gdb 7.1.50 snapshot from the source gdb-7.1.50.20100521. tar.bz2 link to expat static library (under Loaden's mingw 4.4.4 and Msys)

You can download it from gdb-7.1.50.20100521.7z

It is just runs fast as gdb 7.0.1.
As you know, the 7.1 version has some problems(time delay when showing wxString), this gdb 7.1.50 don't have this problem.

Have a try!!

ollydbg

ollydbg:
Updated 2010-06-15
I found that the gdb.exe build from tdm-gcc 4.5 lacks iconv library, this will cause the problem like: Bug 10908 - error reading variable for char variable, So, I rebuild the gdb under Loaden's GCC 4.4.4, now, it works fine, so, I suggest you need to download the file gdb-7.1.50.20100613withpython-2.7z

2010-06-14
Hi, all. Today, I have build the latest gdb CVS under TDM-MinGW 4.5 dw2 with python support.

Firstly, you need to install the python environment, I use header file and libs in this package python Python 2.6.5 Windows installer

the gdb package can be downloaded from Loaden's site: gdb-7.1.50.20100613withpython-2.7z

Now, I have testing the pretty print function of python, it works fine!! :D

There are the brief steps to use the pretty print function. I mainly followed STLSupport - GDB Wiki

The only difference is that, you can create a single *.gdb file, then use this command  "source *.gdb"  instead of using a .gdbinit file.

Then you can add it here: in the debugger setting dialog, see attachment image

Also, I think many py pretty printers can be added, like the wxWidgets support.
http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/misc/gdb/print.py



[attachment deleted by admin]

ollydbg:
Here is the test code:

--- Code: ---#include <iostream>
#include <string>
#include <vector>

using namespace std;

typedef vector<string> vstr;

int main()
{
    vstr vvvv;
    vvvv.push_back("bla bla");
    vvvv.push_back("aaabbb");
    string v0 = vvvv[0];
    cout << "Hello world!" << endl;

    return 0;
}

--- End code ---

Then ,you can enter "print vvvv" in the debugger edit control, and here is the log output:


--- Quote ---> print vvvv
$2 = std::vector of length 2, capacity 2 = {"bla bla", "aaabbb"}
>>>>>>cb_gdb:

--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version