Author Topic: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.  (Read 26284 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5241
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 27 November 2010 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20101127_rev6863_DEBUGGER_BRANCH_win32.7z
  - Linux :
   none

Important changes compared to previous DEBUGGER BRANCH nightly:
* debugger_branch: applied patch by cbexaminr and oBFusCATed with the following features:
- check UpdateDisassembly() rather than UpdateBacktrace() for CMD_STEP_INTO_INSTR handling
- call NotifyCursorChanged() on CMD_STEP_INTO_INSTR and CMD_STEP_INSTR to update any of various affected windows that may be open
- modify disassembly display functionality in effort to:
-- reduce number of times (re-)disassembly requested from gdb
-- when possible avoid total redraw of disassembly and simply reposition "current" instruction gutter indicator
-- correct (one) possible disassembly display failure when program position moved to lower memory address
- modify some of stack frame change response handling to avoid disassembly of area on autoswitch since may not reflect current program instruction
- support "Mixed Mode" disassembly display
- add functionality to let user quickly switch "current" instruction position between top/middle/bottom of disassembly window
- correct cut-n-paste comment error on GdbCmd_InfoRegisters
- NOTES - (with regard to mingw-built GDB 7.2):
-- response information returned from GDB is sometimes missing current instruction address which results in some (re-)disassembly that might otherwise be avoided. (I have not found an architecture independent means of determining the current instruction address to work-around these omissions. GDB's "$pc" changes according to the currently selected stack frame, which may be changed by autoswitch functionality, so cannot be used.)
-- response information returned from GDB for a mixed mode disassembly sometimes fails to include instructions that are present in the target. Hence they cannot be found and indicated in the disassembly display.
* debugger_branch: applied dbg_refactor0017.7.patch:
- added GetIsRunning method to ProjectManager, it is used to query the plugin that is running the project (running the application, debugging the application, etc)
- added SetIsRunning method to ProjectManager, it is used to set the plugin that is running/executing the project, it is set only if the GetIsRunning returns NULL
- modified the Compiler plugin to use the new methods (set and reset correctly the running flag, modified the toolbar/menu updateui functions)
- modified the Debugger plugin to use the new methods (set and reset correctly the running flag, modified the toolbar/menu updateui functions)
- fixed all (almost), bugs encountered since v17.3
* 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.

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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #1 on: November 27, 2010, 03:31:33 pm »
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: [Select]
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 mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 586
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #2 on: November 27, 2010, 05:09:05 pm »
Hi,

I tried "Mixed Mode" disassembly display but getting waiting while disassembling and nothing happens. I am using gdb 6.8. Do I need a newer version?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12688
    • Travis build status
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #3 on: November 27, 2010, 06:09:07 pm »
mariocup: can you paste the debugger's debug log?
(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: 5241
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #4 on: November 27, 2010, 06:29:15 pm »
Hi,

I tried "Mixed Mode" disassembly display but getting waiting while disassembling and nothing happens. I am using gdb 6.8. Do I need a newer version?

same thing, on a simple hello world program-ish program ;-)

Offline mushakk

  • Multiple posting newcomer
  • *
  • Posts: 54
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #5 on: November 29, 2010, 10:49:05 am »
Thanks and good job!

 :D

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12688
    • Travis build status
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #6 on: November 29, 2010, 12:49:31 pm »
killerbot: can you paste the debugger's debug log?  :lol: 8)
(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: 5241
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #7 on: November 30, 2010, 11:43:27 am »
voila, on my linux box I switched to the debugger branch :-)

Some first requests/issues.

In a program I want to be able to use CTRL-Z. However the debugger (gdb) is going to catch this, so where I normally would issue the following command in gdb :

Code: [Select]
handle SIGTSTP nostop noprint pass

I know added this to the Debugger settings -> Debugger intialization commands [note the typo in CB : intialization] :
Code: [Select]
handle SIGTSTP nostop noprint pass

When the debugger session from within CB has started, I check the Debugger->Information->Signal handling, and we see a nice entry : no no yes.
So this is good, however inside the program, cntrl-Z does NOT do what it supposed to do.
This does however work when the program was launched through gdb on the command line (and issueing the handle command in gdb).

Any idea why this doesn't work when the launch happened from CB ?

Request : currently we show the signal table purely informational, wouldn't it be nice that this table could be modified, so we can hide the handle command alltogether, and maybe CB could store this information so it doesn't have to be entered each time ?

What do you guys think ?
« Last Edit: November 30, 2010, 11:45:20 am by killerbot »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5241
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #8 on: November 30, 2010, 11:50:05 am »
Another request :

During a debugging session, one ends up at a given statement in a certain file.
Then one browse around :
- opening other files to look up something
- selecting another frame from the call stack
- ...

Result : you get lost ;-) and have no clue where your last executed statement was, and you want to return to that statement, so you can "see your" "next line" action.

Currently this can be done by going to the callstack and click on the deepest level.

It would be nice, if there was a dedicated button for that in the toolbar, I have seen it in other IDE's (typically the yellow arrow), which just brings the editor of the file containing the "next to execute" statement.

What do you think ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12688
    • Travis build status
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #9 on: November 30, 2010, 12:32:52 pm »
In a program I want to be able to use CTRL-Z. However the debugger (gdb) is going to catch this, so where I normally would issue the following command in gdb :
....
When the debugger session from within CB has started, I check the Debugger->Information->Signal handling, and we see a nice entry : no no yes.
So this is good, however inside the program, cntrl-Z does NOT do what it supposed to do.
This does however work when the program was launched through gdb on the command line (and issueing the handle command in gdb).

Any idea why this doesn't work when the launch happened from CB ?
Have you tried this:
1. start gdb
2. start terminal
3. attach the output of the inferior/debuggee to the terminal using the tty command
4. same as before

My guess is that ctrl+Z is handled inside gdb, not in the debuggee, so if you execute ctrl+z in the terminal there is no way for gdb to receive the signal.


It would be nice, if there was a dedicated button for that in the toolbar, I have seen it in other IDE's (typically the yellow arrow), which just brings the editor of the file containing the "next to execute" statement.
What do you think ?
It is easy to do, but I'm not sure if it is good to waste more space in the toolbar...
Most of the time the Callstack window is too usefull to be closed/hidden:)

But I've added it to my todo, some day I could implement it...
(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: 5241
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #10 on: November 30, 2010, 01:04:35 pm »
or we can start with an entry in the Debug menu, and right click context menu, right ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12688
    • Travis build status
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #11 on: November 30, 2010, 01:16:59 pm »
or we can start with an entry in the Debug menu, and right click context menu, right ?
Yes for Debug menu
No for the context menu, it is too crowded already
(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: 5241
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #12 on: November 30, 2010, 01:20:29 pm »
what about grouping all the debug related ones in a submenu Debug in the right click context menu (toggle breakpoint , run to cursor,  set next statement) ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2251
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #13 on: November 30, 2010, 02:33:45 pm »
Could we hide the remote console on MSW with something like the following:

Code: [Select]
Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp (revision 6710)
+++ src/plugins/debuggergdb/debuggergdb.cpp (working copy)
@@ -831,6 +831,13 @@
         SetConsoleTitleA("Codeblocks debug console - DO NOT CLOSE!");
         SetConsoleCtrlHandler(HandlerRoutine, TRUE);
         m_bIsConsole = true;
+        //(pecan 2010/10/20) start
+        HWND console_window_handle = GetConsoleWindow();
+        if (console_window_handle)
+        {
+            ShowWindow( console_window_handle, SW_HIDE );
+        }
+        //(pecan 2010/10/20) end
     }
     #endif
     // start the gdb process

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2251
Re: The 27 November 2010 build (6863) DEBUGGER BRANCH version is out.
« Reply #14 on: November 30, 2010, 02:44:47 pm »
MSW: "Run to cursor" is enabled, runs the debugger and breaks the program at the cursor.

"Step Into" is enabled, runs the debugger but does not break the program.

Why is "Step Into" enabled before running the debugger?