Author Topic: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.  (Read 70908 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works.

A link to the unicode windows wxWidget dll for Code::Blocks : http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx2812_gcc452-TDM.7z

For those who might need this one (when no MingW installed on your system) : the mingw10m.dll : http://prdownload.berlios.de/codeblocks/mingwm10_gcc452-TDM.7z

The 07 January 2012 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20120107_rev7678_DEBUGGER_BRANCH_win32.7z
  - Linux :
   none

Important changes compared to previous DEBUGGER BRANCH nightly:

* a couple of Mac compatibility fixes

* detect if attaching fails, add some logging when attaching

* detect if any run/continue/start commands fail and stop the debugger (see http://forums.codeblocks.org/index.php/topic,15264.msg103342.html#msg103342)

* do macro expansion for the debugger's executable path

* fixed parsing the output from gdb for watches of type std::map<std::string, std::string>

* Improved the way how the debugging perspective is chosen (the old code was using a hard coded "Debugging" perspective").
Now it is possible to have on perspective for all plugins, one per debugger or one per debugger configuration.
Default is 'one per debugger configuration'.
is one per debugger configuration.
* Use DebuggerManager::GetDebuggerHavingWatch instead of GetActiveDebugger in WatchesDlg::OnExpand and WatchesDlg::OnCollapse;
* Initialized all debugging windows in the main application instead of the debugger gdb plugins
* Refinement of the previous commit (r7630) and now the dialog objects are created explicitly in SetInterfaceFactory;
* Fixed a regression in CDB handling caused by the breakpoint redesign;
* Fixed a bug in the step out implementation of the cdb_driver - if was stepping to the line after the call because an explicit step was done
* Improve the WatchesDlg::RenameWatch function:
* The renamed watch is removed from the plugin it belongs to and it is added to the active debugger;
* UpdateWatch is called, so the children of the old watch are removed
* Added API to test what features a plugin supports. Used the API to implement some features.
* Check if the plugin supports breakpoints and do the appropriate thing in the editor (no toggle breakpoint and no menu entries for breakpoints);
* Call RegisterValueTooltip automatically if the plugin supports value tooltips, made it private;
* Added EnableWindow methods to ExamineMemoryDlg, CPURegistersDlg, BacktraceDlg, ThreadsDlg and DisassemblyDlg;
* Added DebuggerManager::RefreshUI, so all windows can be updated with on call, used it where it was appropriate;
* Added some missing macros to properly implement WatchProperty;
* Added code to test if the plugin support watches and then do the appropriate thing (no adding new watches, no watch properties, etc);
* Added WatchesDlg::RefreshUI, which disables watches from the inactive plugins and enables the watches for the active plugin;
* Added context menu entries only if they are supported by the active plugin (add watch, add data breakpoint, toggle breakpoint, run to cursor, set next statement);
* Enable or disable the menu items used to show/hide debugger windows by checking what is supported by the active plugin
* wx29 fixes;
* fix for update-scripts of some contrib-plugins
* more (better) fixes for wx 2.9.x compatibility, branch compiles now just fine using the wx 2.9 project file
* fixed compiler error with wxPGIdIsOk after setting wxPG_COMPATIBILITY_1_2_0 to 0
* Added API for adding menu items for debugger windows in the menu Debug->Debugging windows;
* Used the new API for adding the current windows;
* Removed old menu items from the xrc file;
* Changed the API for showing the tools menu, now it just fills the menu. This new API is used to fill the Debug->Information;
* Removed all the code related to the tools menu, because all the code should be in the plugins;
* Fixed the crash in batch build mode (do not assume that LoadPanel will succeed);
* Added a way to control the number of elements or the size of char string printed in the watches (uses "set print elements" gdb command);
* debugger_plugin: Added a way to enable or disable the breakpoint, when an exception is thrown, during debugging. Previously a restart of the debugging session was required;
* Fixed a bug with the autosizing of the columns in the tooltip for variables like "std::string s1("a");". The bug is that the type column is too short and the reason is that the margin was not taken into account. I've added a new method for
returning the width of the margin to wxPropGrid
* Combined the normal log and the debug log in the same window. Changed the API to reflect the change. Hopefully there will be less confusion in the forums in the future;
* Removed the cgDebugger settings filter, because it is not needed;
* all updates that occurred on trunk


Note: Watch parsing prints an error message in the watches window if the parsing fails. If you see this string please report it as a bug.

THIS IS A SPECIAL TEST BUILD OF REFACTORINGS CARRIED OUT ON THE DEBUGGER BRANCH IN OUR SVN.
FOCUS IS ON ENHANCED DEBUGGING USABILITY.

Give your feedback on this version only in this thread, don't mix it with the regular nightly please. If you feel it is however not
related to the debugger functionality itself, then it might be better to report it the corresponding regular nightly build thread.

Once we don't have any blockers on this version,we will merge the changes into trunk and it will be part of the regular nightlies.
« Last Edit: January 11, 2012, 10:43:48 pm by killerbot »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #1 on: January 08, 2012, 12:30:25 am »
Thank you Killerbot :)
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #2 on: January 08, 2012, 12:49:09 am »
Debian packages (binaries and sources) for 32-bit and 64-bit systems can be found in my repo.

If you want to use apt (or dselect, synaptic or whatever) you need to add the following entries to /etc/apt/sources.list :
Code
deb http://apt.jenslody.de/ any dbg
deb-src http://apt.jenslody.de/ any dbg
and remove entries for the normal nightlies.

Alternatively you can download the deb's directly from http://apt.jenslody.de/pool/dbg/c/codeblocks/ .

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #3 on: January 08, 2012, 02:34:51 am »
Great job jens and killerbot!!! Too many improvement since last nightly build.
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: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #4 on: January 11, 2012, 08:36:25 am »
When debugging, I right click on the Call-stack's one entry, and try to select "Switch on double click"  mode(The default value is "Jump on double click").

After click the "Switch..." menu entry, the "Jump ..." is still marked (with a black small dot).

This maybe a bug.

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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #5 on: January 11, 2012, 09:04:34 am »
When debugging, I right click on the Call-stack's one entry, and try to select "Switch on double click"  mode(The default value is "Jump on double click").

After click the "Switch..." menu entry, the "Jump ..." is still marked (with a black small dot).

This maybe a bug.


For me the default was "Switch ..." and I was able to set it to "Jump ...".
But setting it back to the"Switch"-option seems not to work.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #6 on: January 11, 2012, 09:33:52 am »
Show be fixed in svn. Thanks for the report.
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #7 on: January 11, 2012, 10:05:05 am »
Show be fixed in svn. Thanks for the report.
:) Thanks for the quick fix!!!
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.

Max

  • Guest
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #8 on: January 11, 2012, 10:07:58 am »
OBFusCATed...

Are you aware that the shipped script for GDB that permits watching a wxString is no longer working for ap project using (linking) wxWidgets 2.9.3? I moved from 2.8.12 to 2.9.3 and the watch window is now unable to show th contents of a wxString.

Regards

Max

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #9 on: January 11, 2012, 10:22:48 am »
Yes, in 2.9.3 you have python pretty printers please enable them, because they are the way forward.
The gdb scripts are something from the past and I have no intentions to support them.
(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 AlexN

  • Multiple posting newcomer
  • *
  • Posts: 16
    • Alex's Link Sammlung
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #10 on: January 11, 2012, 08:18:52 pm »
The 70 January 2012 build is out.

Thank you!

But which calender do you use? ;)
« Last Edit: January 11, 2012, 08:20:51 pm by AlexN »
best regards
 Alex ;)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #11 on: January 11, 2012, 10:44:04 pm »
The 70 January 2012 build is out.

Thank you!

But which calender do you use? ;)

fixed :-)

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #12 on: January 13, 2012, 08:21:44 pm »
Thanks for this nightly, happy new year and coding ! :)
Kernel Extremist - PedroM power ©

Offline renega_666

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #13 on: January 26, 2012, 03:22:15 pm »
Codeblocks r7678
Windows Xp 32 bits | Windows7 32 bits | Windows7 64bits
TDM GCC 4.6.1

Hi!

Since I moved to the latest nightly I have a lot of problems with the debugger's watches.
Every time I want to watch a variable, the following message appears:
"Parsing GDB output failed for ..."
I have created a little sample code that demonstrates the problem:
Code
#include <iostream>
#include <string>
using namespace std;
typedef std::string String;
class Foo
{
public:
  Foo(std::string name) :mName(name),mBar(0){}
  ~Foo(){}
  void print(){std::cout << mBar << std::endl;}
private:
  std::string mName;
  int mBar;
};
int main()
{
  Foo foo("MyFoo");
  foo.print();
  cout << "Hello world!" << endl;
  String str = "My string";
  cout << str << endl;
  return 0;
}

Put a breakpoint on
Code
cout << str << endl;
and try to watch str and foo won't work (parsing output failed)

http://imageshack.us/photo/my-images/822/cbscreen.png/

If you remove the string typedef, the str var is properly shown but not the foo one.

I also tried to enable the debugger's debug log but no log windows appears in the log pane. I only have the regular debug log:
Code
Building to ensure sources are up-to-date
Selecting target:
Debug-Win32
Adding source dir: D:\Projects\Codeblocks\test\
Adding source dir: D:\Projects\Codeblocks\test\
Adding file: D:\Projects\Codeblocks\test\bin\Debug\test.exe
Changing directory to: D:/Projects/Codeblocks/test/.

[debug]PATH=.;C:\MinGW32\bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\swig;C:\Program Files\doxygen\bin;C:\Program Files\Graphic Remedy\gDEBugger\;C:\Program Files\Microsoft Platform SDK\Bin\.;C:\Program Files\Microsoft Platform SDK\Bin\WinNT\.;C:\Program Files\Autodesk\Backburner\;C:\Program Files\Fichiers communs\Autodesk Shared\;C:\Program Files\TortoiseSVN\bin;c:\swig
[debug]Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet -args D:/Projects/Codeblocks/test/bin/Debug/test.exe
[debug]Working dir : D:\Projects\Codeblocks\test

Starting debugger: C:\MinGW32\bin\gdb.exe -nx -fullname  -quiet -args D:/Projects/Codeblocks/test/bin/Debug/test.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 d:\projects\codeblocks\test\bin\debug\test.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.3
[debug]Copyright (C) 2011 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]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.3

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set debugevents on
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Codeblocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> set print static-members off
show print static-members off

[debug]>>>>>>cb_gdb:Printing of C++ static members is off.
[debug]> directory D:/Projects/Codeblocks/test/
[debug]>>>>>>cb_gdb:Printing of C++ static members is off.
[debug]> break "D:/Projects/Codeblocks/test/main.cpp:21"
[debug]>>>>>>cb_gdb:



[debug]> run
[debug]>>>>>>cb_gdb:Breakpoint 2 at 0x401452: file D:\Projects\Codeblocks\test\main.cpp, line 21.
[debug]>>>>>>cb_gdb:
[debug]gdb: windows_init_thread_list

Child process PID: 3104

[debug][New Thread 3104.0xbb8]
[debug]Breakpoint 2, main () at D:\Projects\Codeblocks\test\main.cpp:21
[debug]d:\projects\codeblocks\test\main.cpp:21:388:beg:0x401452
[debug]>>>>>>cb_gdb:

At d:\projects\codeblocks\test\main.cpp:21

[debug]> whatis str
[debug]type = String
[debug]>>>>>>cb_gdb:
[debug]> output str
[debug]{
[debug]  _M_dataplus = {
[debug]    <std::allocator<char>> = {
[debug]      <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug]    members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug]    _M_p = 0x3e3d44 "My string"
[debug]  }
[debug]}>>>>>>cb_gdb:
[debug]> whatis foo
[debug]type = Foo
[debug]>>>>>>cb_gdb:
[debug]> output foo
[debug]{
[debug]  mName = {
[debug]    _M_dataplus = {
[debug]      <std::allocator<char>> = {
[debug]        <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug]      members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug]      _M_p = 0x3e3d14 "MyFoo"
[debug]    }
[debug]  },
[debug]  mBar = 0
[debug]}>>>>>>cb_gdb:


Everything was working fine with the previous nightly (7550).

Codeblocks is now unusable for debugging for me so I'm going to switch back to the previous nightly...
« Last Edit: January 26, 2012, 03:33:21 pm by renega_666 »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 07 January 2012 build (7678) DEBUGGER BRANCH version is out.
« Reply #14 on: January 26, 2012, 04:04:43 pm »
@renega_666
Your test code works OK under a gdb.exe (which has python script enabled), you should also load the pretty-printer for stl when debugger started (see: GDB Pretty printer introduction and setup).

You can have to try MinGW's official gdb 7.3 (gdb-python27.exe) or mybuild ([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.