Author Topic: Splitting debugger in two - specific debugger and common GUI  (Read 430967 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #525 on: November 14, 2011, 04:40:02 pm »
Code
    // compiler set buttons
    if (XRCCTRL(*this, "btnAddCompiler", wxButton)) // only if exist
    {
        en = !data; // global options selected
I saw that, too already. IMHO the old code was a hack to differ between the dialog with the global compiler options and the dialog local (project/target based) options. This was implemented rather bad, obviously... ;-)

EDIT: My intention was to directly check for a valid m_pProject pointer, which means, a project is present (not valid for the global compiler dialog). It doesn't seem to work though... :-(
« Last Edit: November 14, 2011, 04:43:48 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #526 on: November 14, 2011, 09:20:56 pm »
The compileroptionsdialog is used in two places:
one time as panel from "Settings -> Compiler and debugger" (compilergcc.cpp:548), without a project,
and the other time if "Project -> Build options" is clicked (compilergcc.cpp:526), with a project of course.
So different controls are needed and therefore shown.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #527 on: November 14, 2011, 09:28:35 pm »
Code
    // compiler set buttons
    if (XRCCTRL(*this, "btnAddCompiler", wxButton)) // only if exist
    {
        en = !data; // global options selected
I saw that, too already. IMHO the old code was a hack to differ between the dialog with the global compiler options and the dialog local (project/target based) options. This was implemented rather bad, obviously... ;-)

EDIT: My intention was to directly check for a valid m_pProject pointer, which means, a project is present (not valid for the global compiler dialog). It doesn't seem to work though... :-(
It seems to works correctly here.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #528 on: November 15, 2011, 09:25:20 am »
EDIT: My intention was to directly check for a valid m_pProject pointer, which means, a project is present (not valid for the global compiler dialog). It doesn't seem to work though... :-(
[...]
It seems to works correctly here.
That would be good news... I can't try myself atm...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #529 on: December 12, 2011, 11:01:19 am »
I assume the latest changes in the debugger branch broke the batch build feature of C::B. The effect is strange: The wxScintilla control cannot be created and C::B crashes.

The crash log points to:
DebuggerManager -> SetInterfaceFactory -> cbDebugInterfaceFactory

To reproduce, try to run a batch build like this:
codeblocks --batch-build-notify --no-batch-window-close --target=All --build WhatEver.workspace

Does it happen for you, too?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #530 on: December 12, 2011, 12:05:46 pm »
To reproduce, try to run a batch build like this:
Here comes a backtrace:
Code
sdk/wxscintilla/src/wxscintilla.cpp:247
sdk/wxscintilla/src/wxscintilla.cpp:1721
src/disassemblydlg.cpp:55
src/debugger_interface_creator.cpp:111
sdk/debuggermanager.cpp:990
src/main.cpp:787
src/main.cpp:702
src/main.cpp:567
src/app.cpp:407
src/app.cpp:641
The pointers to the wxscintilla.cpp and main.cpp source files might not be meaningful, as they differ from the once of the debugger branch.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2775
Cannot stop debugger
« Reply #531 on: December 12, 2011, 05:50:51 pm »
I've happened on a situation where the debugger cannot be paused or stopped.

SVN 7631 debugger branch
Here are the steps
1) Load the debugger branch BrowseTracker.cbp
2) Place a trap at stmt 443
Code
// ----------------------------------------------------------------------------
void JumpTracker::OnMenuJumpBack(wxCommandEvent &/*event*/)
// ----------------------------------------------------------------------------
{asm("int3"); /*trap*/
    #if defined(LOGGING)
    LOGIT( _T("JT [%s]"), _T("OnMenuJumpBack"));
    #endif

3) compile without -g and with -s
4) run the debugger with BrowseTracker loaded.
5) load codeblocks.cbp into the debugee
6) click anywhere in a source file, page down two pages and click again
7) click on menu, view, jump, jump back ;the debugee CB will trap.
8) click on debug toolbar "next line"
All but the pause and stop buttons will then disable, but the debugger will forever be "Trying to pause the run in progress"
Code
Debugger log
----------------
Active debugger config: GDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker\
Adding source dir: C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker\
Adding file: ..\..\..\devel\codeblocks.exe
Changing directory to: C:/Usr/Proj/cbDebug/trunk/src/plugins/contrib/BrowseTracker/.
Starting debugger: gdb.exe -nx -fullname  -quiet -args ../../../devel/codeblocks.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.0
Child process PID: 3472
Program received signal SIGTRAP, Trace/breakpoint trap.
In ?? () (C:\Usr\Proj\cbDebug\trunk\src\devel\share\codeblocks\plugins\BrowseTracker.dll)


Debugger(debug) log
-------------------
PATH=.;C:\Usr\Proj\cbDebug\trunk\src\devel;C:\Usr\Proj\wxWidgets2810\lib\gcc_dll;C:\Usr\mingw431\bin;C:\Usr\Proj\ImageCraft\ImageCraft_AVR\trunk\src\output;C:\WINDOWS\system32;C:\WINDOWS;.;c:\usr\bin;c:\usr\bin\subversion\
Command-line: gdb.exe -nx -fullname  -quiet -args ../../../devel/codeblocks.exe
Working dir : C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker
> set prompt >>>>>>cb_gdb:
Reading symbols from C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker/../../../devel/codeblocks.exe...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source c:\Usr\Proj\cbDebug\trunk\src\output\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/Usr/Proj/cbDebug/trunk/src/plugins/contrib/BrowseTracker/
>>>>>>cb_gdb:
> set args --debug-log --multiple-instance -na -ns -nd
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 3472.0xb54]
a70000.
[New Thread 3472.0xa04]
[New Thread 3472.0x9fc]
[New Thread 3472.0xf84]
[New Thread 3472.0x10f8]
[New Thread 3472.0x458]
[New Thread 3472.0xe58]
[New Thread 3472.0x284]
[New Thread 3472.0x4f0]
[New Thread 3472.0xbac]
[New Thread 3472.0xb7c]
[New Thread 3472.0x15c]
[New Thread 3472.0x137c]
Error: dll starting at 0x76e90000 not found.
Error: dll starting at 0x751c0000 not found.
Error: dll starting at 0x76e90000 not found.
Error: dll starting at 0x76d90000 not found.
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
(... lots of these...)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
Program received signal SIGTRAP, Trace/breakpoint trap.
0x04c37a8a in ?? () from C:\Usr\Proj\cbDebug\trunk\src\devel\share\codeblocks\plugins\BrowseTracker.dll
Current language:  auto
The current source language is "auto; currently c++".
>>>>>>cb_gdb:
> set debugevents off
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
>>>>>>cb_gdb:
> bt 30
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x28f8a3 in read in psymtab, but not in symtab.)
(...lots and lots of these...)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
#0  0x04c37a8a in ?? () from C:\Usr\Proj\cbDebug\trunk\src\devel\share\codeblocks\plugins\BrowseTracker.dll
#1  0x0028f8a4 in ?? ()
#2  0x0028f8a4 in ?? ()
#3  0x0028f440 in ?? ()
#4  0x101a398b in wxMenuBase::UpdateUI(wxEvtHandler*) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#5  0x10095099 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#6  0x100951bb in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#7  0x100977e6 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#8  0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#9  0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#10 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#11 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#12 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#13 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#14 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#15 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#16 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#17 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#18 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#19 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#20 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#21 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#22 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#23 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#24 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#25 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#26 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#27 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#28 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#29 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
>>>>>>cb_gdb:
« Last Edit: December 12, 2011, 05:56:11 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #532 on: December 12, 2011, 05:57:10 pm »
OK, I'll see what happens.
Is this reproducible with simple console project?

I'm not sure this is the whole log, by the way. There is no log about the stopping events.
« Last Edit: December 12, 2011, 05:58:59 pm by oBFusCATed »
(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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2775
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #533 on: December 12, 2011, 05:59:59 pm »
Here's the "stopping event"

Code
Active debugger config: GDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker\
Adding source dir: C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker\
Adding file: ..\..\..\devel\codeblocks.exe
Changing directory to: C:/Usr/Proj/cbDebug/trunk/src/plugins/contrib/BrowseTracker/.
Starting debugger: gdb.exe -nx -fullname  -quiet -args ../../../devel/codeblocks.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.0
Child process PID: 3528
Program received signal SIGTRAP, Trace/breakpoint trap.
In ?? () (C:\Usr\Proj\cbDebug\trunk\src\devel\share\codeblocks\plugins\BrowseTracker.dll)
Trying to pause the running process...
Trying to pause the running process...
Trying to pause the running process...



PATH=.;C:\Usr\Proj\cbDebug\trunk\src\devel;C:\Usr\Proj\wxWidgets2810\lib\gcc_dll;C:\Usr\mingw431\bin;C:\Usr\Proj\ImageCraft\ImageCraft_AVR\trunk\src\output;C:\WINDOWS\system32;C:\WINDOWS;.;c:\usr\bin;c:\usr\bin\subversion\
Command-line: gdb.exe -nx -fullname  -quiet -args ../../../devel/codeblocks.exe
Working dir : C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker
> set prompt >>>>>>cb_gdb:
Reading symbols from C:\Usr\Proj\cbDebug\trunk\src\plugins\contrib\BrowseTracker/../../../devel/codeblocks.exe...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set print elements -1
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source c:\Usr\Proj\cbDebug\trunk\src\output\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/Usr/Proj/cbDebug/trunk/src/plugins/contrib/BrowseTracker/
>>>>>>cb_gdb:
> set args --debug-log --multiple-instance -na -ns -nd
>>>>>>cb_gdb:
> run
gdb: windows_init_thread_list
[New Thread 3528.0x258]
d=600, DBG_CONTINUE);
[New Thread 3528.0xcd0]
[New Thread 3528.0x11d8]
[New Thread 3528.0xe14]
[New Thread 3528.0xaf8]
[New Thread 3528.0x1220]
[New Thread 3528.0xb5c]
[New Thread 3528.0x5bc]
[New Thread 3528.0xe58]
[New Thread 3528.0xeb4]
[New Thread 3528.0xc7c]
[New Thread 3528.0x204]
[New Thread 3528.0x12f4]
Error: dll starting at 0x76e90000 not found.
Error: dll starting at 0x751c0000 not found.
Error: dll starting at 0x76e90000 not found.
Error: dll starting at 0x76d90000 not found.
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
[New Thread 3528.0x10bc]
Program received signal SIGTRAP, Trace/breakpoint trap.
0x04c37a8a in ?? () from C:\Usr\Proj\cbDebug\trunk\src\devel\share\codeblocks\plugins\BrowseTracker.dll
Current language:  auto
The current source language is "auto; currently c++".
>>>>>>cb_gdb:
> set debugevents off
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
>>>>>>cb_gdb:
> bt 30
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
(... many duplicate lines removed...)
warning: (Internal error: pc 0x100977a6 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
#0  0x04c37a8a in ?? () from C:\Usr\Proj\cbDebug\trunk\src\devel\share\codeblocks\plugins\BrowseTracker.dll
#1  0x0028f8a4 in ?? ()
#2  0x0028f8a4 in ?? ()
#3  0x0028f440 in ?? ()
#4  0x101a398b in wxMenuBase::UpdateUI(wxEvtHandler*) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#5  0x10095099 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#6  0x100951bb in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#7  0x100977e6 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#8  0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#9  0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#10 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#11 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#12 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#13 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#14 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#15 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#16 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#17 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#18 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#19 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#20 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#21 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#22 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#23 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#24 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#25 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#26 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#27 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#28 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
#29 0x100977a7 in wxEvtHandler::ProcessEvent(wxEvent&) () from C:\Usr\Proj\cbDebug\trunk\src\devel\wxmsw28u_gcc_custom.dll
>>>>>>cb_gdb:
> next
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x4c37a8a in read in psymtab, but not in symtab.)
Cannot find bounds of current function
>>>>>>cb_gdb:


With simple "Hello World" the program steps once and runs to end.
« Last Edit: December 12, 2011, 06:05:25 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #534 on: December 13, 2011, 07:47:00 pm »
Does it happen for you, too?
Yes, it does.

Here is a patch that fixes it. Is it OK to commit it?

Explanation:
Before my commit it was working, because CreateToolbars() was called before creating the debugger related windows. Now it is called after that.
And for some strange reason CreateToolbars is loading the resources for the second time.

Code
Index: src/src/app.cpp
===================================================================
--- src/src/app.cpp     (revision 7634)
+++ src/src/app.cpp     (working copy)
@@ -525,12 +525,15 @@
         // set safe-mode appropriately
         PluginManager::SetSafeMode(m_SafeMode);
 
-        if(!m_Batch && m_Script.IsEmpty() && !InitXRCStuff())
+        if(!m_Batch && m_Script.IsEmpty())
         {
            // wsSafeShowMessage(_T("Fatal error"), _T("Initialisation of resources failed."));
             return false;
         }
 
+        if (!InitXRCStuff())
+            return false;
+
         InitLocale();
 
         if(m_DDE && !m_Batch && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/use_ipc"), true))
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #535 on: December 13, 2011, 08:19:04 pm »
Here is a patch that fixes it. Is it OK to commit it?
To be honest its strange to see why this patch should work?! But if it does and you are sure to have found the reason, feel free to go ahead. My worries are that the batch window might need the XRC stuff to be initialised (I am not sure about that) so it might have some side effects... (remember that you can enable plugins at will in batch mode) - I'll try though... If the XRC stuff is really not needed in batch mode (Yiannis?!) than it would actually be a good thing not to initialise it, as this safes time.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #536 on: December 13, 2011, 08:55:58 pm »
I did not test the patch, but if I see it correctly, OnInit will always return false, if we are not in batch-build mode and do not give a script to execute on commandline.
This should be true in most cases, where C::B is used "normally".

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #537 on: December 13, 2011, 09:51:31 pm »
Jens, I'm not sure I understand what you've just said/written... :(
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #538 on: December 13, 2011, 10:31:23 pm »
Jens, I'm not sure I understand what you've just said/written... :(
On normal startup of C::B m_Batch is false and m_Script is empty and with your patch, OnInit() will always return false and therefore end the application.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Splitting debugger in two - specific debugger and common GUI
« Reply #539 on: December 14, 2011, 12:02:21 am »
Argh, you're right.

What about this version then:

Code
Index: C:/dev/cb_dev/debugger1/src/src/app.cpp
===================================================================
--- C:/dev/cb_dev/debugger1/src/src/app.cpp (revision 7633)
+++ C:/dev/cb_dev/debugger1/src/src/app.cpp (working copy)
@@ -524,8 +524,7 @@
 
         // set safe-mode appropriately
         PluginManager::SetSafeMode(m_SafeMode);
-
-        if(!m_Batch && m_Script.IsEmpty() && !InitXRCStuff())
+        if(!InitXRCStuff() && !m_Batch && m_Script.IsEmpty())
         {
            // wsSafeShowMessage(_T("Fatal error"), _T("Initialisation of resources failed."));
             return false;


I've search the svn history and it seems that the check was added on purpose by Thomas in r2706.
Thomas any comments on this?
(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!]