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 :
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/) .
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:
> 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:
monitor speed auto
monitor endian little
load
monitor reset
After this without break points the hardware is executing.
Kind regards
themaddin
Same problems with the 17 September 2011 build (7452) DEBUGGER BRANCH version.
Debuggers log summary:
> 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:
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.
(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.
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:
[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:
[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:
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
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:
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.
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.
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:
[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:
> 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.
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.
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()
@jens:
I try to install your key, but failed. see the log:
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.