Author Topic: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.  (Read 34551 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5489
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_wx2810_gcc441.7z

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

The 24 August 2010 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20100824_rev6527_DEBUGGER_BRANCH_win32.7z
  - Linux :
   none

Important changes compared to regular nightly:

* The stop button was split to pause and stop
* New watches window using wxPropGrid
*      Rename the watch with the Insert key (don't work on windows, some help will be appreciated)
*      Delete key in Breakpoints window deletes the selected breakpoint
*      Drag/drop from the editor to the watches window
*      Made adding watches from the context menu in the editor to be easier: select some text -> right click -> add watch
*  The evaluate tooltip should not show outside the editor window, also should not show if you move the mouse from the initial position
* Added "Set next statement command", please use with care and understanding ( http://sunsite.ualberta.ca/Documentation/Gnu/gdb-4.18/html_node/gdb_93.html )
* Switch to frame does work now (added option to make double clicking switch to frame or jump to frame in the call stack window)
* Fixed bug https://developer.berlios.de/bugs/?func=detailbug&bug_id=16146&group_id=5358
* Fixed bug 13972 ( http://developer.berlios.de/bugs/?func=detailbug&bug_id=13972&group_id=5358 )
* If the build fail a message box is shown "Build failed. Do you want to debug, anyway?", it is useful for debugging unittest projects that have failing tests
* Attaching and detaching should work better (BUG: attaching to codeblocks doesn't at the moment)
* Ensure visible the selected/active frame in the backtrace window
* Run host it terminal ( Project -> Set programs' arguments)
* Close the console when the user unloads the project/closes C::B, while the debugger is running
* Clicking on a frame that points to a missing file now shows an info window with the error message
* Catching exceptions should work now
* Added command to disable the feature of gdb to shorten the lines in the output from commands.
    This should improve the reliability of the plugin.


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.

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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #1 on: August 24, 2010, 09:13:50 pm »
Some notes:

1. Please look for regressions! A regression is a bug that is not present in the regular nightly, but present in this one.
Only regressions will be blockers (I think:) )
2. When you find a bug, please paste the debugger's debug log ( Settings -> Compiler & Debugger -> Debugger -> Display debugger's log ).
Please use code tags, in order to keep the readability of your posts.
3. I think GCC >=4.5.x requires GDB 7.0+, so if you're using this version of GCC please update your GDB

Known problems:
1. Local variables are not shown in the watches window.
        Reason: I wanted to move them to separate window, but wxAUI doesn't support moving windows from on notebook to another,
                     so I've just removed them and I'm waiting wx guys to implement this feature (go bug them on their mailing list :) )
2. Function arguments are not shown in the watches windows.
        Reason: same as above
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5489
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #2 on: August 24, 2010, 09:31:45 pm »
can we have in the watches window, several tabs (kind of like in the project management window), we could have a tab with manual added watches, and one with function arguments and locals.
We could even have a second tab with manual added watches ;-) [I think MSVC has this]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #3 on: August 24, 2010, 09:38:15 pm »
Yes, we can, wxPG supports pages (see the wxPG in the wxSmith), but I don't like them solution...

MSVC has Watches1, Watches2, Watches3,Watches4, Autos, Locals, but they can dock any window inside any notebook/zone, it is pretty powerful...
« Last Edit: August 24, 2010, 09:40:17 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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5489
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #4 on: August 24, 2010, 09:49:07 pm »
well it could  be a temp solution until you can implement the functionality like you prefer once wx dev's have added what you want. The latter could take some time I guess. The former could enhance the debugging experience in the short term ?

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #5 on: August 25, 2010, 04:11:58 am »
In the watches(new), could you let's support tooltip for every value? :)

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #6 on: August 25, 2010, 04:19:07 am »
About local variables and function arguments, I personally think that can be shown in the same watch.
And we can add  a column named "variables scope".
There can be:
Local variables
Global variables
Function arguments
Member variables
...

Any comments?

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #7 on: August 25, 2010, 04:21:26 am »
Or, add a small picture in the front of the variables, shown the scope?

Online ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5906
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #8 on: August 25, 2010, 04:57:58 am »
MSVC has Watches1, Watches2, Watches3,Watches4, Autos, Locals, but they can dock any window inside any notebook/zone, it is pretty powerful...

several watches have a performance advantage compared to one watches. that means, only the variables in "active front watch window" need to be "refreshed" when you do a step or something similar.

As refresh a variable need some communication with gdb, then it takes a lot of time if you have many watch variables in an active watch window.

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 ptDev

  • Almost regular
  • **
  • Posts: 222
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #9 on: August 25, 2010, 08:29:19 am »
MSVC has Watches1, Watches2, Watches3,Watches4, Autos, Locals, but they can dock any window inside any notebook/zone, it is pretty powerful...

several watches have a performance advantage compared to one watches. that means, only the variables in "active front watch window" need to be "refreshed" when you do a step or something similar.

As refresh a variable need some communication with gdb, then it takes a lot of time if you have many watch variables in an active watch window.


What if we had several "watched variable lists", selectable via a combobox in the watches window? This way we could have as many sets of symbols as we desire. Would be very powerful.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #10 on: August 25, 2010, 11:36:27 am »
Please concentrate on bugs, when we get to re-adding the local/args to the watches I could/will start a discussion...
(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 Orgulas

  • Single posting newcomer
  • *
  • Posts: 4
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #11 on: August 25, 2010, 08:17:14 pm »
What about a combined "Debug/Continue" menu command? Just like the toolbar button, but with the ability to assign a hot key. Been missing it for so long...
Code
main(int f,int*v){for(f=fopen(*++v,"r");*v=~getc(f);)putchar(~*v);}

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #12 on: August 25, 2010, 08:51:10 pm »
What about a combined "Debug/Continue" menu command? Just like the toolbar button, but with the ability to assign a hot key. Been missing it for so long...
This is a feature request, we can start another thread for such things :)

Regressions only please:)

p.s. I've added this to my TODO
(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!]

Max

  • Guest
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #13 on: August 31, 2010, 09:38:00 pm »
Dear Devs,

I tested in several debugging sessions the new debugger plugin. Overall (IMO) the new interface works better than before. I didn't (so far) observe any regression. Moreover a very annoying bug (crash of CB during debugging) seems disappeared. I was used to get one or two crashes for each debugging session but now no crash at all.  :lol:

Two questions:

1) You wrote

* Catching exceptions should work now

but I can't agree with you :). Well it depends on the meaning of the word "work". To me it seems working as in the previous nightly.

For example

Code

#include <iostream>
#include <stdexcept>

void throwSomething(void);

using namespace std;

int main()
{
    try
     {
       throwSomething();
     }

     catch(std::runtime_error& except)
     {
       cout << "Hello Exceptions " << except.what() << endl;
     }

    cout << "This is the end" << endl;

    return 0;
}

void throwSomething(void)
{
  throw std::runtime_error("The Exception");
}



compiled with -Wall -fexceptions  -gstabs+  has the following behavior.

In the Debugger panel

Quote

Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Development\Projects\testException\
Adding source dir: C:\Development\Projects\testException\
Adding file: obj\testException.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.1
Child process PID: 948
Continuing...
Program exited normally.
Debugger finished with status 0



So no evidence of any Catching. Obviously the debugger stopped and I pressed continue. But when the debugger stops there is no info on the debugger panle, telling what is happening and where.

But in Debugger log panel I got

Quote
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source C:\Codeblocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/Development/Projects/testException/
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 948.0xb68]
Catchpoint 1 (exception thrown), 0x00401610 in __cxa_throw ()
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> cont
Program exited normally.
>>>>>>cb_gdb:
> quit


Does that mean " Catching exceptions should work now", or, in other words, is that the expected behavior?

2) Is there any plan to merge the new debugger into trunk? I really appreciate the lack of crashing!
Or is it planned to release, every now and then, a special nightly of the debugger branch? I don't like to use an old nightly.

Thanks and regards

Max

Added info:

Uisng MinGW GCC 4.5.0 (latest packages) with GDB 7.1, Windows XP SP3
« Last Edit: August 31, 2010, 09:43:46 pm by MaxGaspa »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5489
Re: The 24 August 2010 build (6527) DEBUGGER BRANCH version is out.
« Reply #14 on: August 31, 2010, 09:46:53 pm »
what should be the behavior when an exception is thrown when running from within the debugger in CB ?
I would guess, things should continue since code was catching the exception, right ?