oBFusCATed: Thank you for responding to my question. I am really new to C::B, so I am grateful for your expert help.
and4cb: Please provide the full debug log (you have to enable it in the options).
I do have the "Full (debug) log" option enabled, but I am not sure where to find the debug log after I have run my program. Please let me know what the naming convention should be on the debug log so that I can search for it on my computer.
I copied the text from the Debugger window and pasted it here (hope this helps):
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Code\test4\
Adding source dir: C:\Code\test4\
Adding file: C:\Code\test4\bin\Debug\test4.exe
Changing directory to: C:/Code/test4/.
Set variable: PATH=.;C:\MinGW32\bin;C:\MinGW32;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared;C:\Program Files (x86)\Common Files\DivX Shared;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\QuickTime\QTSystem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Live\Shared
[debug]Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname -quiet -args C:/Code/test4/bin/Debug/test4.exe
[debug]Working dir : C:\Code\test4
Starting debugger: C:\MinGW32\bin\gdb.exe -nx -fullname -quiet -args C:/Code/test4/bin/Debug/test4.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from C:\Code\test4\bin\Debug\test4.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 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 "i686-pc-mingw32".
[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.5
[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 new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> source C:\cb20121112\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Code/test4/
[debug]Source directories searched: C:/Code/test4;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> tbreak "C:/Code/test4/main.c:232"
[debug]Temporary breakpoint 1 at 0x402783: file C:\Code\test4\main.c, line 232.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Code\test4\bin\Debug\test4.exe
Child process PID: 4652
[debug][New Thread 4652.0xc68]
[debug]Temporary breakpoint 1, main () at C:\Code\test4\main.c:232
[debug]C:\Code\test4\main.c:232:11126:beg:0x402783
[debug]>>>>>>cb_gdb:
At C:\Code\test4\main.c:232
[debug]> bt 30
[debug]#0 main () at C:\Code\test4\main.c:232
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Initialize () at C:\Code\test4\Initial.c:52
[debug]C:\Code\test4\Initial.c:52:4041:beg:0x402052
[debug]>>>>>>cb_gdb:
At C:\Code\test4\Initial.c:52
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test4\Initial.c:52
[debug]#1 0x00402788 in main () at C:\Code\test4\main.c:232
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]C:\Code\test4\Initial.c:56:4630:beg:0x402059
[debug]>>>>>>cb_gdb:
At C:\Code\test4\Initial.c:56
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test4\Initial.c:56
[debug]#1 0x00402788 in main () at C:\Code\test4\main.c:232
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]C:\Code\test4\Initial.c:58:4770:beg:0x402063
[debug]>>>>>>cb_gdb:
At C:\Code\test4\Initial.c:58
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test4\Initial.c:58
[debug]#1 0x00402788 in main () at C:\Code\test4\main.c:232
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]C:\Code\test4\Initial.c:59:4924:beg:0x40206f
[debug]>>>>>>cb_gdb:
At C:\Code\test4\Initial.c:59
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test4\Initial.c:59
[debug]#1 0x00402788 in main () at C:\Code\test4\main.c:232
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]C:\Code\test4\Initial.c:62:5185:beg:0x40207b
[debug]>>>>>>cb_gdb:
At C:\Code\test4\Initial.c:62
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test4\Initial.c:62
[debug]#1 0x00402788 in main () at C:\Code\test4\main.c:232
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]InitializeDate (theDate=0x408150) at C:\Code\test4\dates.c:403
[debug]>>>>>>cb_gdb:
Trying to pause the running process...
Trying to pause the running process...
Trying to pause the running process...
When there is such problem you can kill gdb then you can use C::B again.
Please let me know how to "kill gdb" when the "Stop Debugger" button does not work, and the Command box in the Debugger window will no longer accept commands?
Thank you again for helping me.
Sorry for the late reply. I didn't know that it was a feature and I filled in as a bug which was accepted. ;) Anyway is there a way to disable that cuz with my theme, colors are quite disturbing?
The only way to disable (currently) is to modify some code. The initialization is here:
sdk/cbstyledtextctrl.cpp, line: 243
if (index != wxNOT_FOUND && (wxChar)GetCharAt(GetCurrentPos()) == s_rightBrace.GetChar(index))
{
const int pos = GetCurrentPos();
if (pos != wxSCI_INVALID_POSITION)
{
m_tabSmartJump = true;
m_bracePosition = pos;
}
}
If you just want different colors, they have been hard-coded here:
sdk/cbstyledtextctrl.cpp, line: 430
if (s_rightBrace.Contains(cur))
{
SetCaretForeground(wxColour(255, 0, 0));
SetCaretWidth(caretWidth + 1);
IndicatorSetForeground(s_indicHighlight, wxColour(80, 236, 120));
IndicatorSetStyle(s_indicHighlight, wxSCI_INDIC_HIGHLIGHT);
#ifndef wxHAVE_RAW_BITMAP
IndicatorSetUnder(s_indicHighlight, true);
#endif
SetIndicatorCurrent(s_indicHighlight);
IndicatorFillRange(pos, 1);
m_bracePosition = pos + 1;
return;
}
Making these settings configurable would not be that difficult, just no one has yet had the motivation to do it.
No icon change I think [...]
I agree that the icons probably should not be changed (unless Code::Blocks wants to go through a complete graphics makeover...), but I think some of the icons should be swapped with higher quality (but still similarly themed) versions. (Installing Code::Blocks on newer Windows machines looks rather bad with larger icon sizes.) In a few days, I will have a package of icons (probably mostly just what I posted last time) that I will recommend be considered.
With regards to the logo, I presume there will be a splash contest soon :).
Hello oBFusCATed: Based on your reply, I have edited my post to make it more readable, and I am using the Task Manager to "kill" gdb when necessary.
Can you reproduce this problem on a simple example project?
Here is a simple program that demonstrates the problem.
(If I should be posting this question in a different thread, please let me know.)
I am grateful for any clue you can give me to solve this problem.
#include <stdio.h>
#include <stdlib.h>
int INUM1 = 0;
int main(void); //prototype
void Initialize(void); //prototype
int InitNum(int num); //prototype
int main(void) // "Run to cursor" here, then "Next line"
{
Initialize(); // "Step into"
return 0;
}
void Initialize(void)
{
printf("\nBefore call to InitNum(), INUM1 = %d", INUM1);
//When I Step Into this next line
// the Debug buttons become disabled
// and to "kill" gdb, I must use Task Manager
INUM1 = InitNum(4);
printf("\nAfter call to InitNum(), INUM1 = %d", INUM1);
}
int InitNum(int num)
{
num = (num + 4);
return num;
}
Debugger Log:
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Code\test5\
Adding source dir: C:\Code\test5\
Adding file: C:\Code\test5\bin\Debug\test5.exe
Changing directory to: C:/Code/test5/.
Set variable: PATH=.;C:\MinGW32\bin;C:\MinGW32;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared;C:\Program Files (x86)\Common Files\DivX Shared;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\QuickTime\QTSystem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Windows Live\Shared
[debug]Command-line: C:\MinGW32\bin\gdb.exe -nx -fullname -quiet -args C:/Code/test5/bin/Debug/test5.exe
[debug]Working dir : C:\Code\test5
Starting debugger: C:\MinGW32\bin\gdb.exe -nx -fullname -quiet -args C:/Code/test5/bin/Debug/test5.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from C:\Code\test5\bin\Debug\test5.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 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 "i686-pc-mingw32".
[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.5
[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 new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> source C:\cb20121112\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Code/test5/
[debug]Source directories searched: C:/Code/test5;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> tbreak "C:/Code/test5/main.c:10"
[debug]Temporary breakpoint 1 at 0x40133f: file C:\Code\test5\main.c, line 10.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Code\test5\bin\Debug\test5.exe
Child process PID: 2540
[debug][New Thread 2540.0x1450]
[debug]Temporary breakpoint 1, main () at C:\Code\test5\main.c:12
[debug]C:\Code\test5\main.c:12:233:beg:0x40133f
[debug]>>>>>>cb_gdb:
At C:\Code\test5\main.c:12
[debug]> bt 30
[debug]#0 main () at C:\Code\test5\main.c:12
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]Initialize () at C:\Code\test5\main.c:19
[debug]C:\Code\test5\main.c:19:312:beg:0x401351
[debug]>>>>>>cb_gdb:
At C:\Code\test5\main.c:19
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test5\main.c:19
[debug]#1 0x00401344 in main () at C:\Code\test5\main.c:12
[debug]>>>>>>cb_gdb:
[debug]> next
[debug]C:\Code\test5\main.c:24:508:beg:0x401366
[debug]>>>>>>cb_gdb:
At C:\Code\test5\main.c:24
[debug]> bt 30
[debug]#0 Initialize () at C:\Code\test5\main.c:24
[debug]#1 0x00401344 in main () at C:\Code\test5\main.c:12
[debug]>>>>>>cb_gdb:
[debug]> step
[debug]InitNum (num=4) at C:\Code\test5\main.c:31
[debug]>>>>>>cb_gdb:
Trying to pause the running process...
Patch for NON-PCH building under Windows 7.
Needed to remove warning and error on Windows 7 build done with NOPCH and without CB_PRECOMP and WX_PRECOMP.
Including sdk_precomp.h is valid for the SDK not valid for Plug-ins and Main executable under Windows.
Strange Error: when not including wx/button.h.
..\..\..\.objs\plugins\contrib\help_plugin\MANFrame.o:MANFrame.cpp:(.rdata$_ZTV18wxBitmapButtonBase[__ZTV18wxBitmapButtonBase]+0x2dc)||undefined reference to `wxButton::GetClassInfoW() const'|
Index: src/plugins/contrib/help_plugin/MANFrame.cpp
===================================================================
--- src/plugins/contrib/help_plugin/MANFrame.cpp (revision 8574)
+++ src/plugins/contrib/help_plugin/MANFrame.cpp (working copy)
@@ -10,6 +10,7 @@
#ifndef CB_PRECOMP
#include <wx/arrstr.h>
+ #include <wx/button.h>
#include <wx/dir.h>
#include <wx/filename.h>
#include <wx/sizer.h>
Index: src/src/breakpointsdlg.cpp
===================================================================
--- src/src/breakpointsdlg.cpp (revision 8574)
+++ src/src/breakpointsdlg.cpp (working copy)
@@ -7,7 +7,7 @@
* $HeadURL$
*/
-#include "sdk_precomp.h"
+#include "sdk.h"
#ifndef CB_PRECOMP
# include <algorithm>
Tim S.
I was running splint on a program I work on and fixing casual warnings like ignoring return values from functions. I found that casting the return value as void, ie:
Breaks Code::Blocks's ability to find functioncall's declaration or implementation, such as from the context menu. If I delete the void typecast and try to have C::B find the function's declaration, it brings up a list of two declarations to choose from:
int functioncall(void)
(void) callingfunctionname::function
Showing that the void cast confused C::B's parser. Re-parsing the project doesn't correct or avoid this bug. I just figured I'd mention it because the find declaration/implementation was screwy in the last nightly I tried as well (10-13-12 nightly), where sometimes it would fail to find the declaration/implementation, then when I tried it again a second later, it would find it.
Edit: Also, I noticed another bug where when I do a search and replace within all of the project's files, when it completes the operation, it does not render the source file is selected. It made me think C::B had hung until I noticed that all of the rest of the GUI was responsive.
Edit: Also, I noticed another bug where when I do a search and replace within all of the project's files, when it completes the operation, it does not render the source file is selected. It made me think C::B had hung until I noticed that all of the rest of the GUI was responsive.
If you compile C::B yourself, can you try the following patch:
Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp (revision 8584)
+++ src/sdk/editormanager.cpp (working copy)
@@ -2219,9 +2219,12 @@
// if we showed the progress, the app window is frozen; unfreeze it
if (progress)
+ {
+ delete progress;
Manager::Get()->GetAppWindow()->Thaw();
+ }
- delete progress;
+ Manager::Get()->GetAppWindow()->Refresh();
return pos;
}
?
The attached patch should (hopefully) satisfy everyone.
... *Facepalm*
I must have been working to late at night; I deleted the initialization for a member variable.
(Also noticed that WXK_NUMPAD_TAB was forgotten.)
Index: src/plugins/contrib/EditorTweaks/EditorTweaks.cpp
===================================================================
--- src/plugins/contrib/EditorTweaks/EditorTweaks.cpp (revision 8598)
+++ src/plugins/contrib/EditorTweaks/EditorTweaks.cpp (working copy)
@@ -182,6 +182,7 @@
}
m_suppress_insert = cfg->ReadBool(wxT("/suppress_insert_key"), false);
m_convert_braces = cfg->ReadBool(wxT("/convert_braces"), false);
+ m_buffer_caret = -1;
}
void EditorTweaks::OnRelease(bool /*appShutDown*/)
@@ -431,40 +432,32 @@
const int keyCode = event.GetKeyCode();
switch (keyCode)
{
- case WXK_NUMPAD_UP:
- case WXK_UP:
+ case WXK_NUMPAD_UP: case WXK_UP:
if (event.GetModifiers() != wxMOD_CONTROL)
DoBufferEditorPos(-1);
break;
- case WXK_NUMPAD_DOWN:
- case WXK_DOWN:
+ case WXK_NUMPAD_DOWN: case WXK_DOWN:
if (event.GetModifiers() == wxMOD_CONTROL)
break;
// fall through
- case WXK_NUMPAD_ENTER:
- case WXK_RETURN:
+ case WXK_NUMPAD_ENTER: case WXK_RETURN:
DoBufferEditorPos(1);
break;
- case WXK_TAB:
+ case WXK_NUMPAD_TAB: case WXK_TAB:
if (event.GetModifiers() != wxMOD_NONE)
break;
// fall through
case WXK_BACK:
- case WXK_NUMPAD_DELETE:
- case WXK_DELETE:
- case WXK_NUMPAD_LEFT:
- case WXK_LEFT:
- case WXK_NUMPAD_RIGHT:
- case WXK_RIGHT:
+ case WXK_NUMPAD_DELETE: case WXK_DELETE:
+ case WXK_NUMPAD_LEFT: case WXK_LEFT:
+ case WXK_NUMPAD_RIGHT: case WXK_RIGHT:
if (event.GetModifiers() == wxMOD_ALT)
break;
// fall through
- case WXK_NUMPAD_HOME:
- case WXK_HOME:
- case WXK_NUMPAD_END:
- case WXK_END:
+ case WXK_NUMPAD_HOME: case WXK_HOME:
+ case WXK_NUMPAD_END: case WXK_END:
DoBufferEditorPos();
break;