Author Topic: [OT] unofficial MinGW GDB gdb with python released  (Read 254114 times)

Offline nenin

  • Almost regular
  • **
  • Posts: 202
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #135 on: September 01, 2011, 04:02:01 pm »
1. c::b 10.05 is too old, I suggest you should use the latest nightly build debugger branch version.
1. Tank you for operative response.
2. How stable nightly build version is?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #136 on: September 01, 2011, 04:07:42 pm »
If you turn off CC it is very stable :)
If you use CC there are some crashes...
« Last Edit: September 02, 2011, 02:04:27 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nenin

  • Almost regular
  • **
  • Posts: 202
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #137 on: September 02, 2011, 01:59:36 pm »
If you turn of CC it is very stable :)
If you use CC there are some crashes...
What is "CC"?  :?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #138 on: September 02, 2011, 02:04:20 pm »
Code completion.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline nenin

  • Almost regular
  • **
  • Posts: 202
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #139 on: September 02, 2011, 02:09:10 pm »
Code completion.
I forgot about it since return from Delphi to C++.   :D

Offline nenin

  • Almost regular
  • **
  • Posts: 202
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #140 on: September 02, 2011, 02:57:43 pm »
1. c::b 10.05 is too old, I suggest you should use the latest nightly build debugger branch version.
2. you need to open the "Debugger settings" dialog, then uncheck the "enable watch script" option, if you use python based gdb. (I noticed that if you check this option when using python pretty printer, there will be a crash on gdb).
Confirmed. Works with  svn7387.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #141 on: November 08, 2011, 02:08:07 pm »
2011-11-08 release
Pre-build binary can be found in gdb2011-11-08cvs.7z

GDB built with python support, you need to install python 2.7.2 in your system. This build include some patches to handle file paths problem under Windows system.

A patch to accelerate the file path comparasion, see: asmwarrior - Re: [RFC] Avoid calling gdb_realpath if basenames are different and Re: configure file to debug codecompletion plugin

Watchpoint can be used in both gdb.exe and gdbserver.exe, see: brobecke - src/gdb/gdbserver ChangeLog win32-i386-low.c

The total diff file to the gdb cvs head source can be found in: gdb2011-11-08cvs.diff
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #142 on: January 19, 2012, 02:57:54 pm »
2012-01-19
HAPPY CHINESE NEW YEAR (Dragon year is coming)
The new pre-build binary package can be found in gdb2012-01-19.7z, it is gdb's latest cvs version with my patch applied.
I remove the hard-coded relocated code, because gdb can relocate correctly, see: Doug Evans - Re: Possible fix for mingw32 directory relocation problems related discussion for more details. The other parts of the patch include: work around the crash problem of local variable print, adjust some minor file paths of call-stack print.

EDIT 2012-02-16
Update to new release, and fix a tiny regression since 2011-12-12.
See more details in the first post in this thread.
« Last Edit: February 16, 2012, 01:19:46 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #143 on: May 22, 2012, 10:10:27 am »
Bump to GDB cvs 2012-05-22, see the first post for download link and more information.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #144 on: August 19, 2012, 03:13:24 pm »
Bump to gdb cvs 2012-08-17, see the download links in the first post. (gdb 7.5 is already released, but I still prefer using the cvs head :))
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #145 on: December 16, 2012, 04:04:30 pm »
Bump to gdb cvs 2012-12-15, see the first post: [OT] unofficial MinGW GDB gdb with python released
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #146 on: February 04, 2013, 03:37:23 pm »
Bump to 2013-02-04 release, the "filename display format" patch was now already in gdb cvs, see the first post for more information.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #147 on: June 08, 2013, 02:46:44 am »
Updated to GDB cvs 2013-06-08, see the [OT] unofficial MinGW GDB gdb with python released for more details.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline golgepapaz

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #148 on: July 06, 2013, 12:08:21 am »
Since I am one of those unlucky souls suffering from the dreaded message
'Cannot evaluate function -- may be inlined' while trying to see a string
at the watch window, I'd  thought to give it another try with a recent
version of gdb with python support which I've built with the help of instructions
from the http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en

Code
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname  -quiet  -args E:/codeblocks_svn/src/devel/codeblocks.exe
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from E:\codeblocks_svn\src\devel\codeblocks.exe...(no debugging symbols found)...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version

Reading symbols from E:\codeblocks_svn\src\devel\codeblocks.exe...(no debugging symbols found)...done.

[debug]GNU gdb (GDB) 7.6.50.20130705-cvs
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.6.50.20130705-cvs
Yup, right off the head. Although I've failed to build it at first
because of the reading fail of the warning about the line endings.

Anyway, with still no joy and seeing the same dreaded message
about strings.I've turned on the full debug log and hovering over
a string variable I noticed this.

Code
[debug]> whatis fileToParse
[debug]type = std::string
[debug]>>>>>>cb_gdb:
[debug]> output &fileToParse
[debug](std::string *) 0x3f0fd14>>>>>>cb_gdb:
[debug]> output fileToParse.c_str()[0]@fileToParse.size()
[debug]Cannot evaluate function -- may be inlined
[debug]>>>>>>cb_gdb:

Cannot evaluate function -- may be inlined

whereas using the commands <print> or <output> from the debugger
log window prints the string nicely.
Code
> p fileToParse

[debug]> p fileToParse
[debug]$5337 = "E:\\c++11.denemeler\\clang_cc\\TestFiles\\classtest.cpp"
[debug]>>>>>>cb_gdb:

$5337 = "E:\\c++11.denemeler\\clang_cc\\TestFiles\\classtest.cpp"
> output fileToParse

[debug]> output fileToParse
[debug]"E:\\c++11.denemeler\\clang_cc\\TestFiles\\classtest.cpp">>>>>>cb_gdb:

"E:\\c++11.denemeler\\clang_cc\\TestFiles\\classtest.cpp"

So I am guessing that debugger plugin is sending the wrong commands to the debugger
Is there a way to fix this?

Edit: Oh darn it.I've just noticed there is a option for disabling watch scrips if you are using python
enabled gdb in debugger configuration window.All is well I can see my strings now.
« Last Edit: July 06, 2013, 12:15:13 am by golgepapaz »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [OT] unofficial MinGW GDB gdb with python released
« Reply #149 on: July 06, 2013, 05:43:32 pm »
...
Edit: Oh darn it.I've just noticed there is a option for disabling watch scrips if you are using python
enabled gdb in debugger configuration window.All is well I can see my strings now.
Good to hear this. In fact, your problem was discussed in our forum before, see: Re: The 25 August 2012 build (8248) is out.
« Last Edit: July 06, 2013, 05:55:59 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.