Hello everyone,
is somebody out there who is debugging with Codeblocks and Codesourcery GDB?
I have troubles debugging with Codeblocks and Codesourcery GDB. It seems Codesourcery executes every GDB instruction from Codeblocks twice.
Debuggers log with Codesourcery GDB:
[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.
With Yagarto GDB everything is fine:
[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:
Kind regards
themaddin
Hi,
I have spent some time investigating this issue and found the following:
1) The CodeSourcery gdb is compilled with version of MinGW which uses both \r and \n as an EOL
2) The wxWidget text stream is converting \n to the \n\r
As a result gdb receives 2 EOLs.
This is a quick fix:
void PipedProcess::SendString(const wxString& text)
{
//Manager::Get()->GetLogManager()->Log(m_PageIndex, cmd);
wxOutputStream* pOut = GetOutputStream();
if (pOut)
{
wxTextOutputStream sin(*pOut);
sin.SetMode(wxEOL_UNIX);
wxString msg = text + _T('\n');
sin.WriteString(msg);
}
}
which works fine on windows.
This is a test build:
http://mwc-ng.googlecode.com/files/CodeBlocks_svn_gdb.zip
regards,
ziss_dm