Code::Blocks Forums

User forums => Nightly builds => Topic started by: killerbot on February 12, 2012, 05:19:20 pm

Title: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: killerbot on February 12, 2012, 05:19:20 pm
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 (http://forums.codeblocks.org/index.php/topic,3232.0.html).

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 11 February 2012 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20120211_rev7790_DEBUGGER_BRANCH_win32.7z
  - Linux :
   none

Important changes compared to previous DEBUGGER BRANCH nightly:

* Added editor markers for breakpoints in the inactive debuggers. Added the same icon in the breakpoints dialog;
* Added UI for setting additional/user arguments for GDB (should implement the same for CDB)
* Fixed the GDB watch parser, when parsing std::deque variables (template inheritance involved), added the required tests for the parser
* proper fix for calculating path (which lead to garbage earlier)
* Fixed possible memory leak if there are unexecuted commands in the command queue (thanks tomjnx)
* fix drag to watches-dialog bug; on linux the dragged variable was deleted in source, if Strg was not pressed, see: http://forums.codeblocks.org/index.php/topic,15777.msg106723.html#msg106723
* Fixed the no breakpoint bug, when setting a breakpoint on a line and then running to the same line with 'Run to Cursor'
* 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.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: Jenna on February 12, 2012, 05:35:06 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
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/ (http://apt.jenslody.de/pool/dbg/c/codeblocks/) .
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 13, 2012, 02:43:46 pm
Hello everyone,

I'm using this version of Code::Blocks with CodeSourcery, J-Link GDB-Server via JTAG and the Segger J-LINK.
It seems that every GDB instruction is send twice to the GDB-Server.
For Example:
If i type "monitor reset" to the debuggers command line in Code::Blocks it appears twice:
> monitor reset
Resetting target
>>>>>>cb_gdb:
Resetting target
>>>>>>cb_gdb:

Also in the log window of the GDB-Server:
Resetting target
Resetting target

Further more every breakpoint i set with Code::Blocks is set twice in GDB.

Is this a bug or a adjustment problem?


Kind regards
themaddin
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 13, 2012, 02:49:12 pm
Does it work with any of the previous nightlies?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 13, 2012, 03:11:03 pm
I tried the official version 10.05. With this version I had other problems with GDB. But it seems that 10.05 also sends instructions twice to GDB.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 13, 2012, 04:27:20 pm
10.05 is irrelevant, because the branch has modifications to 50-90% of the code related to the debugger.
Please test previous debugger's branch nightlies and tell me if there is even one which works.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 13, 2012, 08:41:43 pm
Okay, I will test tomorow.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 14, 2012, 09:29:03 am
I tested the 30 October 2011 build (7550) DEBUGGER BRANCH version:

If I type "monitor reset" Resetting target appears also twice
> monitor reset
Resetting target
>>>>>>cb_gdb:
Resetting target
>>>>>>cb_gdb:

Breakpoints are also set twice.

It seems every instruction is executed twice. See the summary of my debuggers log after connection:
Code
> target remote tcp:localhost:2331
0x00000000 in ?? ()
>>>>>>cb_gdb:>>>>>>cb_gdb:
> monitor speed auto
> monitor speed auto
Select auto JTAG speed (4000 kHz)
>>>>>>cb_gdb:
> monitor endian little
Select auto JTAG speed (4000 kHz)
Select auto JTAG speed (4000 kHz)
Select auto JTAG speed (4000 kHz)
>>>>>>cb_gdb:>>>>>>cb_gdb:>>>>>>cb_gdb:
> load
Target endianess set to "little endian"
Target endianess set to "little endian"
>>>>>>cb_gdb:>>>>>>cb_gdb:Loading section .isr_vector, size 0x1e4 lma 0x8000000
> monitor reset
Loading section .version_mat, size 0x4 lma 0x8001008
Loading section .version_ver, size 0x4 lma 0x800100c
Loading section .version_cpu, size 0x4 lma 0x8001010
Loading section .text, size 0x26d30 lma 0x8001018
Loading section .data, size 0x4664 lma 0x8027d48
Start address 0x80172c8, load size 177540
Transfer rate: 126 KB/sec, 11096 bytes/write.
>>>>>>cb_gdb:Loading section .isr_vector, size 0x1e4 lma 0x8000000
> continue
Loading section .version_mat, size 0x4 lma 0x8001008
Loading section .version_ver, size 0x4 lma 0x800100c
Loading section .version_cpu, size 0x4 lma 0x8001010
Loading section .text, size 0x26d30 lma 0x8001018
Loading section .data, size 0x4664 lma 0x8027d48
Start address 0x80172c8, load size 177540
Transfer rate: 127 KB/sec, 11096 bytes/write.
>>>>>>cb_gdb:
Resetting target
>>>>>>cb_gdb:
Resetting target
>>>>>>cb_gdb:

My Additional GDB commands after connection:
Code
monitor speed auto
monitor endian little
load
monitor reset
After this without break points the hardware is executing.

Kind regards
themaddin
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 14, 2012, 09:41:13 am
Same problems with the 07 January 2012 build (7678) DEBUGGER BRANCH version.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 14, 2012, 09:52:08 am
Same problems with the 17 September 2011 build (7452) DEBUGGER BRANCH version.

Debuggers log summary:
Code
> target remote tcp:localhost:2331
0x00000000 in ?? ()
>>>>>>cb_gdb:>>>>>>cb_gdb:
> monitor speed auto
Select auto JTAG speed (4000 kHz)
>>>>>>cb_gdb:
> monitor endian little
Select auto JTAG speed (4000 kHz)
Target endianess set to "little endian"
Target endianess set to "little endian"
>>>>>>cb_gdb:>>>>>>cb_gdb:>>>>>>cb_gdb:
> load
Loading section .isr_vector, size 0x1e4 lma 0x8000000
Loading section .version_mat, size 0x4 lma 0x8001008
Loading section .version_ver, size 0x4 lma 0x800100c
Loading section .version_cpu, size 0x4 lma 0x8001010
Loading section .text, size 0x26d30 lma 0x8001018
Loading section .data, size 0x4664 lma 0x8027d48
Start address 0x80172c8, load size 177540
Transfer rate: 127 KB/sec, 11096 bytes/write.
>>>>>>cb_gdb:Loading section .isr_vector, size 0x1e4 lma 0x8000000
> monitor reset
Loading section .version_mat, size 0x4 lma 0x8001008
Loading section .version_ver, size 0x4 lma 0x800100c
Loading section .version_cpu, size 0x4 lma 0x8001010
Loading section .text, size 0x26d30 lma 0x8001018
Loading section .data, size 0x4664 lma 0x8027d48
Start address 0x80172c8, load size 177540
Transfer rate: 127 KB/sec, 11096 bytes/write.
>>>>>>cb_gdb:
> continue
Resetting target
>>>>>>cb_gdb:
> bt 30
Resetting target
>>>>>>cb_gdb:
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 14, 2012, 09:57:11 am
The last log seems OK.
Can you post one valid debug session with command line gdb?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 14, 2012, 02:34:45 pm
I think the last log seems not OK. Every instruction is confirmed twice. And it seems also executed twice.
Why do you think the log is OK?

Here is a valid debug session i typed manually to the DOS command line.
Code
(gdb) target remote localhost:2331
Remote debugging using localhost:2331
0x00000000 in ?? ()
(gdb) monitor speed auto
Select auto JTAG speed (4000 kHz)
(gdb) monitor endian little
Target endianess set to "little endian"
(gdb) load
Loading section .isr_vector, size 0x184 lma 0x8000000
Loading section .text, size 0x1958 lma 0x8000184
Loading section .data, size 0x24 lma 0x8001adc
Start address 0x800058c, load size 6912
Transfer rate: 450 KB/sec, 2304 bytes/write.
(gdb) monitor reset
Resetting target
(gdb) break main.c:63
Breakpoint 1 at 0x80004b6: file D:\Evaltest207\source\Main.c, line 63.
(gdb) cont
Continuing.

Breakpoint 1, main () at D:\Evaltest207\source\Main.c:63
63        GPIO_WriteBit(GPIOC,GPIO_Pin_7,Bit_SET);//LED4 on
(gdb) info break
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x080004b6 in main at D:\Evaltest207\source\Main.c:63
        breakpoint already hit 1 time
(gdb)

If I do the same with the Code::Blocks GUI at first the break point is set twice. This is no problem unless you want to remove the break point. If I click continue Code::Blocks stops at the break point and the target is running. I think this is because Code::Blocks executes the instruction "continue" twice.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 14, 2012, 04:48:19 pm
Strange.
Is this version of gdb available to the general public?
Also Do I need some hardware to reproduce the problem?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 15, 2012, 08:57:18 am
I will look if there is a solution to repruduce the problem without hardware and public tools.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 15, 2012, 09:43:58 am
Another option is to debug it yourself.

You can put a breakpoint in PipedProcess::SendString and you can inspect the coming commands.

Something else you could do is to try different end of line mode for the wxTextOutputStream.
I have a guess, that using wxEOL_UNIX will fix you problem.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 15, 2012, 04:34:25 pm
Oh, I wish I could CB debug by myself but this is very new to me.

Now I'm working with 11 February 2012 build (7790) DEBUGGER BRANCH version.

It is possible to reproduce the problem without hardware. All you need is CB and Codesourcery. Codesourcery Lite is freeware. You can download it here: http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/ (http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/) (Download the EABI Release)


Compiler executable: arm-none-eabi-gcc.exe

Debugger executable: arm-none-eabi-gdb.exe

If you create a empty project and click continue the following debugger log should appear:
Code
[debug]GNU gdb (Sourcery CodeBench Lite 2011.09-69) 7.2.50.20100908-cvs
[debug]Copyright (C) 2010 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 "--host=i686-mingw32 --target=arm-none-eabi".
[debug]For bug reporting instructions, please see:
[debug]<https://support.codesourcery.com/GNUToolchain/>.
[debug]>>>>>>cb_gdb:GNU gdb (Sourcery CodeBench Lite 2011.09-69) 7.2.50.20100908-cvs
[debug]> set confirm off

Debugger name and version: GNU gdb (Sourcery CodeBench Lite 2011.09-69) 7.2.50.20100908-cvs

[debug]Copyright (C) 2010 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 "--host=i686-mingw32 --target=arm-none-eabi".
[debug]For bug reporting instructions, please see:
[debug]<https://support.codesourcery.com/GNUToolchain/>.
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set debugevents on
[debug]No symbol table is loaded.  Use the "file" command.
[debug]No symbol table is loaded.  Use the "file" command.
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set new-console on
[debug]No symbol table is loaded.  Use the "file" command.
[debug]No symbol table is loaded.  Use the "file" command.
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]No symbol table is loaded.  Use the "file" command.
[debug]No symbol table is loaded.  Use the "file" command.
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> catch throw
[debug]No symbol table is loaded.  Use the "file" command.
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:Catchpoint 2 (throw)
[debug]> source C:\CodeBlocks_NB7790sa\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory D:/cb_projects/mysecproject/
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]>>>>>>cb_gdb:
[debug]Don't know how to run.  Try "help target".
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:>>>>>>cb_gdb:>>>>>>cb_gdb:

Every confirmation appears twice.


I think this is a problem between Codeblocks and Codesourcery.
It seems other people had this problem too. Look at the following GDB-Server log: http://www.mikrocontroller.net/topic/170920#1634778. Every message appears twice. Very similar to my problem.



I tried the GNU gdb from Yagarto tools. This one works fine.

Debuggers log with empty project:
Code
[debug]GNU gdb (GDB) 7.2
[debug]Copyright (C) 2010 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 "--host=i686-pc-mingw32 --target=arm-none-eabi".
[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.2

[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]No symbol table is loaded.  Use the "file" command.
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]No symbol table is loaded.  Use the "file" command.
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]No symbol table is loaded.  Use the "file" command.
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\CodeBlocks_NB7790sa\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory D:/cb_projects/mysecproject/
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Don't know how to run.  Try "help target".
[debug]>>>>>>cb_gdb:
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 16, 2012, 12:46:02 pm
It seems to me that is a general problem between CodeBlocks and Codesourcery GDB.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 16, 2012, 12:53:05 pm
At the moment you can do one of these three things:
1. Wait for me to restart in windows and inspect your problem
2. Apply the change I proposed and see if this is the problem
3. Persuade someone else to do it

Spamming the forum with the same problem over and over again won't increase the chances of this problem getting fixed.
It can only minimize them, because I can get annoyed.  :P

p.s. I've added this problem to my to-do, so it wouldn't be forgotten.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 16, 2012, 01:43:06 pm
Hello oBFusCATed!
I don't want you to get annoyed. My only answering voice of this forum. ;) I'm glad to hear this thing is on your to do list.

Thanks for your reply. I will look if i could do one of the three things you mentioned.
My workaround is to use the yagarto gdb executable.

Kind regards
Martin
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: Aradayn on February 18, 2012, 04:47:09 am
I reported an issue ages ago with a nightly build that's still showing up in this one. In a nutshell, opening up the debugger settings crashed the IDE on my machine.

I finally got Codeblocks building from source this morning, and I narrowed the problem down significantly tonight. It appears that having a debugger name that is too long causes the crash:

debuggersettingsdlg.cpp:85
Code
m_treebook->AddPage(new DebuggerSettingsPanel(m_treebook, this, it->first), it->first->GetGUIName());

You see, the name I'm getting is "GDB Debugger." If I change the line like so:
Code
m_treebook->AddPage(new DebuggerSettingsPanel(m_treebook, this, it->first), _("GDB"));
it doesn't crash! It seems that if the debugger name is too long to fit in the panel, the crash occurs.

There's probably some crazy sizing thing causing infinite recursion somewhere deep in wx or Windows if this text overflows the panel for some reason, but I don't know wx well enough to get to the root of the issue.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 18, 2012, 10:10:30 am
Aradayn: Thanks for the tests you've done. I'll see if I can find time to do some more debugging about this problem.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 19, 2012, 07:51:17 pm
@themaddin:
I've just tested with Codesourcery on windows and it turns out I'm right.
Using SetMode(wxEOL_DOS) fixes the problem.
Can you ask the Codesourcery's support what do they think about this problem?

@devs: Should I add an option to specify the EOL mode or should I try to find another solution?

@Aradayn: Confirmed, using _("GDB") instead of the full name fixes the crash.
Does anyone know what I can do to debug this?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: MortenMacFly on February 19, 2012, 08:13:07 pm
Using SetMode(wxEOL_DOS) fixes the problem.
[...]
@devs: Should I add an option to specify the EOL mode or should I try to find another solution?
I didn't fully understand why and where you want to add this?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 19, 2012, 08:28:31 pm
Code
Index: src/sdk/pipedprocess.cpp
===================================================================
--- src/sdk/pipedprocess.cpp    (revision 7821)
+++ src/sdk/pipedprocess.cpp    (working copy)
@@ -148,6 +148,7 @@
     if (pOut)
     {
         wxTextOutputStream sin(*pOut);
+        sin.SetMode(wxEOL_UNIX);
         wxString msg = text + _T('\n');
         sin.WriteString(msg);
     }

Here is the patch that makes it work.
The reason is that this version of gdb treats both \n and \m as new command markers.
So using \n\m triggers as two commands:
1. the actual command
2. the re execution of the command, because most debuggers treat empty commands as "repeat-last-command", this is a feature to simplify usage.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: MortenMacFly on February 19, 2012, 09:58:08 pm
Here is the patch that makes it work.
OK - I see. However, this is a very sensible component, so we really should test long(er). Remember your last trial to change this class??? ;-) ;D ;D ;D

I'll apply in my local copy and report back...
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 19, 2012, 10:25:09 pm
The change would be simple and non-destructive. I'm thinking of adding another parameter to the SendString function and also to add an option, to use the wxEOL_DOS which will be off by default.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 21, 2012, 02:47:06 pm
Hello oBFusCATed,

thanks for your effort. Codesourcery offers support only for paid versions.
I think the change you are thinking about would be great.  :)

Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 21, 2012, 02:59:22 pm
I think the change you are thinking about would be great.  :)
Great is not the right word here! :(

Do you have an e-mail, where I can write to them then?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: scarphin on February 21, 2012, 06:01:24 pm
Codesourcery offers support only for paid versions.
Although they offer support only for paid versions, I don't think they'll decline bug reports. ;)

@obfuscated: They have a contact page here but I don't know if that's what u are looking for.
http://www.mentor.com/embedded-software/contactme (http://www.mentor.com/embedded-software/contactme)
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 22, 2012, 02:14:26 pm
Do you have an e-mail, where I can write to them then?
No, unfortunately not. Maybe the contact page posted by scarphin helps.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 22, 2012, 02:21:02 pm
No, unfortunately not. Maybe the contact page posted by scarphin helps.
This is unfortunate.

Note: Change of plans, anyone having this problem and wanting it being fixed should talk to codesourcery's support/dev/gdb maintainers.
I don't intend to support every quirk in every different gdb release.

If you don't want to talk to codesourcery's support your only chance is to patch c::b yourself.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: themaddin on February 22, 2012, 03:39:11 pm
Okay, that's a clear announcement.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 22, 2012, 04:39:10 pm
I could change my mind if the codesourcery people have a valid reason and if they say that they can't change their version of gdb.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: scarphin on February 22, 2012, 05:23:58 pm
I'll contact them to ask for a bug report address as I'm also concerned with this matter.

@obfuscated: Shall I pm u the address if I find any?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 22, 2012, 05:26:37 pm
I would prefer someone else to handle the bug-reporting. But if you can't do it, an e-mail on pm sounds OK.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: scarphin on February 22, 2012, 05:39:55 pm
I would if I could but I don't think I can handle it. I hope I will someday. ;)
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: p2rkw on February 24, 2012, 01:11:25 am
Hi,
I just find out that c::b watch scripts doesn't recognize typedefs. It's because 'whatis' gives alias name.
Second 'whatis' is necessary to obtain real type. Part of the log:
Code
[debug]> whatis vi
[debug]type = std::vector<int, std::allocator<int> >
[debug]>>>>>>cb_gdb:
[debug]> output &vi
[debug](std::vector<int, std::allocator<int> > *) 0x22fea8>>>>>>cb_gdb:
[debug]> pvector vi
[debug]elem[0]: $7 = 4
[debug]elem[1]: $8 = 56
[debug]elem[2]: $9 = 36
[debug]elem[3]: $10 = 843
[debug]elem[4]: $11 = 265
[debug]elem[5]: $12 = 62
[debug]Vector size = 6
[debug]Vector capacity = 8
[debug]Element type = int
[debug]>>>>>>cb_gdb:
[debug]> whatis vi2
[debug]type = IntVector
[debug]>>>>>>cb_gdb:
[debug]> output &vi2
[debug](IntVector *) 0x22fe9c>>>>>>cb_gdb:
[debug]> output vi2
[debug]{
[debug]  <std::_Vector_base<int, std::allocator<int> >> = {
[debug]    _M_impl = {
[debug]      <std::allocator<int>> = {
[debug]        <__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>},
[debug]      members of std::_Vector_base<int, std::allocator<int> >::_Vector_impl:
[debug]      _M_start = 0x3e27e8,
[debug]      _M_finish = 0x3e2800,
[debug]      _M_end_of_storage = 0x3e2808
[debug]    }
[debug]  }, <No data fields>}>>>>>>cb_gdb:
And what gdb says about IntVector:
Code
> whatis IntVector

[debug]> whatis IntVector
[debug]type = std::vector<int, std::allocator<int> >
[debug]>>>>>>cb_gdb:

type = std::vector<int, std::allocator<int> >

What u think about sending second 'whatis' when adding watch?

Currently using 11 February 2012 build (7790) DEBUGGER BRANCH version.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ollydbg on February 24, 2012, 01:18:37 am
c::b watch scripts is quite limited, and I suggest you use the python pretty printer. See this as a reference if you use mingw. http://code.google.com/p/qp-gcc/wiki/GDB
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: p2rkw on February 24, 2012, 02:42:41 am
nice stuff, printer works very well, but there is another problem:
After "python" command gdb doesn't recognize "end" command, so there's nothing i can do (gdb just hangs) and must terminate gdb via process explorer.

Thanks for help.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ollydbg on February 24, 2012, 02:56:44 am
ok, got it, printer works very well, but there is another problem:
After "python" command gdb doesn't recognize "end" command
I can confirm that enter some command like:
Code
python
print 3
end
But it looks like the "end" command does not recognized by gdb. maybe, the "end" command does not send correctly to gdb. so I can't run any command after that.

I just tested gdb under command line, and it works fine, "end" command can successfully end the “python" session, so it looks like something should be fixed in debugger plugin's source.  :)

BTW: You don't need to manually run some python script in the command line input in the c::b, you just load the pretty printer when you start debugging, and you should disable the build in watch script in the debugger plugin's option dialog.

Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ollydbg on February 24, 2012, 03:11:20 am
ok, got it, printer works very well, but there is another problem:
After "python" command gdb doesn't recognize "end" command
I can confirm that enter some command like:
Code
python
print 3
end
But it looks like the "end" command does not recognized by gdb. maybe, the "end" command does not send correctly to gdb. so I can't run any command after that.

I just tested gdb under command line, and it works fine, "end" command can successfully end the “python" session, so it looks like something should be fixed in debugger plugin's source.  :)

Ok, from the experience I debug the debugger branch source several days ago, I think the bug is that:
Our debugger plugin do a hand shake on every command you send to gdb, the mechanism is:
1, you send a command to gdb
2, gdb return the value, and restore the gdb's prompt

But in the case that we send command "python", gdb does not return a standard "gdb prompt", but it return a short ">" to wait the user to continuously enter other python commands until it receive "end", so this break the original handshake rule.  :)
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 24, 2012, 08:50:58 am
Just use source. I doubt, I'll fix anything here.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: p2rkw on February 24, 2012, 05:49:57 pm
Ok, I'll use source.

Why in debugger branch automatic locals and args watching is disabled? I have got both relevant options turned on in debugger settings panel, but plugin doesn't send messages(info locals, info args) when the program is paused. win xp 32.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 24, 2012, 06:37:47 pm
Because I've not implemented them back.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ollydbg on February 25, 2012, 01:39:16 am
Ok, I'll use source.

Why in debugger branch automatic locals and args watching is disabled? I have got both relevant options turned on in debugger settings panel, but plugin doesn't send messages(info locals, info args) when the program is paused. win xp 32.


Another reason is that "info locals" will cause the gdb(python enabled, at least under Windows) crash when it try to show an uninitialized local variables. You can search this forum or gdb maillists for some discussion.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on February 25, 2012, 12:58:30 pm
Aradayn:
I think, I've fixed it. It seems that if I set the size of the dialog, before I add the sub panels to the treebook it doesn't crash.
Please test this patch and report if the problems is really fixed. I'll do some testing under linux and I will commit it after that.

Code
Index: src/src/debuggersettingsdlg.cpp
===================================================================
--- src/src/debuggersettingsdlg.cpp (revision 7854)
+++ src/src/debuggersettingsdlg.cpp (working copy)
@@ -74,9 +74,11 @@
 
  Connect(ID_TREEBOOK,wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED,(wxObjectEventFunction)&DebuggerSettingsDlg::OnPageChanged);
  //*)
+ SetMinSize(wxSize(600, 600));
+ SetSize(wxSize(600, 600));
 
     m_commonPanel = new DebuggerSettingsCommonPanel(m_treebook);
- m_treebook->AddPage(m_commonPanel, _("Common"));
+ m_treebook->AddPage(m_commonPanel, _("Common"), true);
 
     DebuggerManager::RegisteredPlugins &plugins = Manager::Get()->GetDebuggerManager()->GetAllDebuggers();
     for (DebuggerManager::RegisteredPlugins::iterator it = plugins.begin(); it != plugins.end(); ++it)
@@ -101,9 +103,6 @@
 
     for (size_t ii = 0; ii < m_treebook->GetPageCount(); ++ii)
         m_treebook->ExpandNode(ii);
-
- SetMinSize(wxSize(600, 600));
- SetSize(wxSize(600, 600));
 }
 
 DebuggerSettingsDlg::~DebuggerSettingsDlg()
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: Aradayn on February 28, 2012, 05:06:55 pm
Thanks, oBFusCATed! That seems to have done the trick. I see the full debugger name and it didn't crash.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ricardo on March 20, 2012, 12:10:17 am
Code
Index: src/sdk/pipedprocess.cpp
===================================================================
--- src/sdk/pipedprocess.cpp    (revision 7821)
+++ src/sdk/pipedprocess.cpp    (working copy)
@@ -148,6 +148,7 @@
     if (pOut)
     {
         wxTextOutputStream sin(*pOut);
+        sin.SetMode(wxEOL_UNIX);
         wxString msg = text + _T('\n');
         sin.WriteString(msg);
     }

Here is the patch that makes it work.
The reason is that this version of gdb treats both \n and \m as new command markers.
So using \n\m triggers as two commands:
1. the actual command
2. the re execution of the command, because most debuggers treat empty commands as "repeat-last-command", this is a feature to simplify usage.

I'm not CodeSourcery support, but I suspect that using DOS style line endings triggers the double execution problem exactly as oBFusCATed has laid out above.  Switching to Unix style line endings is the right fix.  Does anyone know if CodeSourcery's GDB is alone in this behavior or if the FSF's GDB also exhibits this behavior?
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: oBFusCATed on March 20, 2012, 08:49:01 am
There is not FSF build of GDB for windows. The mingw one works OK with the native line endings.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ollydbg on March 28, 2012, 09:57:07 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/ (http://apt.jenslody.de/pool/dbg/c/codeblocks/) .
Linux newbie. (I'm using Ubuntu 10.04 in a virtualbox under winXP)
I tried the method described here:http://apt.jenslody.de/

I have correctly set the file: /etc/apt/sources.list
Wx library installed/updated correctly.
But when I open the synaptic tool, and type the "codeblocks", I can only see the codeblocks 8.02 from Ubuntu official site. I have tried the alternative way( download many deb files from: http://apt.jenslody.de/pool/dbg/c/codeblocks/, then double click to install them), that not quite convenient way to install the debugger branch.

Any one can give me a hint? :)

I also run the "apt-get clear" and "apt-get update" many times.

Thanks.
Title: Re: The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
Post by: ollydbg on March 30, 2012, 04:53:25 am
@jens:
I try to install your key, but failed. see the log:
Code
root@ubuntu:~# sudo apt-get install jens-lody-debian-keyring
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Couldn't find package jens-lody-debian-keyring

Maybe, this is the reason that I can't install codeblocks from apt-get.
any comments?
Thanks.

EDIT:
http://forums.codeblocks.org/index.php/topic,15024.msg100609.html#msg100609
This solve the problem.