Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B
Debugger initialization commands to debug in wxWidgets
Feneck91:
2 years and the problem is not solved :(
If wxWidgets is compile as static library I know it's work but with dynamic library it's not work.
I cannot move my projects to another location because I'm using SVN and linking and compiling with :
My project:
- TTGest.exe
Libraries :
- TTGestLib (dynamic library that contains engine of TTGest if one day I want to port to iPhone, only the GUI to write)
+ Need source of Lua because I use scripting into this software
+ Need wxSQLite3 + SQLite 3 for the database managment
- wxCAnsiPortETK : file transmission by socket using wxETK and CAnsiPort
- wxETK : (wxWidgets Extended Tool Kit) personnal lib that adding features to wxWidgets like log file / log window / CheckBoxListComboBox / Colored Gauge / Automaton & Socket automaton / HTTP managment
- CAnsiPort : C Ansi code based on C++ lib and STL implementing serialization, extended string, MD5 checksum, file and mem file managment
I's not really an "hello word" not really simple to move.
No way, ok I don't track source code into wxWidgets :?
oBFusCATed:
This is a gdb problem. There is no way C::B to use "..\..\src\common\string.cpp:200", sorry.
Please report this problem to the GDB devs.
Another options is to modify the wx build commands to use fullpaths, I don't know if this is possible.
ollydbg:
--- Quote from: oBFusCATed on June 03, 2011, 12:49:16 am ---This is a gdb problem. There is no way C::B to use "..\..\src\common\string.cpp:200", sorry.
Please report this problem to the GDB devs.
Another options is to modify the wx build commands to use fullpaths, I don't know if this is possible.
--- End quote ---
@obf, I found a way (maybe a workaround)
1, I build wxWidgets library my self, with the command:
--- Code: ---cd wxWidgets-2.8.12\build\msw
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug
--- End code ---
2, now, I create a wx app project under C::B, which link to wx debug library.
3, now, debug the app, set a breakpoint in the app's source.
with the "step into" command, I can trace into the wx's source (both header files and cpp files)
4, If I use c::b to add a break point in wx's cpp source file, like(Note, c::b use absolute path to set a breakpoint)
--- Code: --->>>>>>cb_gdb:
> break "D:/code/wxWidgets-2.8.12/src/common/string.cpp:158"
--- End code ---
Then, gdb.exe will crash and showing a alert message box(application error)
5, If I add a break point manually, through the command below(send it from the debug-log edit control)
--- Code: --- break ../../src/common/string.cpp:167
Breakpoint 2 at 0x66d89f57: file ../../src/common/string.cpp, line 167.
--- End code ---
Then, this break point works and the app can stops there. But as this breakpoint is added manually, so debugger's breakpoint windows does not have a line about this breakpoint. But this "relative path breakpoint" works fine.
As a conclusion:
for debugging wx's source under Windows system
absolute path break point failed.
relative path break point works OK.
Is it possible that c::b can maintain a "relative path breakpoint", so we can smoothly debug the wx source under Windows. :D :D
ollydbg:
look at jens' reply
Re: GDB path problem
--- Quote ---About the problem with the absolute path:
I played a little bit:
If a prgram is compiled with absolute paths, gdb also needs them and if you compile it with relative paths gdb only works if you set the bp with relative path, too.
--- End quote ---
So, currently, the debugger plugin always use an absolute path for a breakpoint. So, if the debugger plugin is smart enough, I mean for debugging the wx library which is build with relative paths, the debugger plugin need to generate the relative path breakpoint command, then our problem can solved nicely. :D
ollydbg:
Well, look at the screen below:
it seems the "relative path" is not correctly solved if I double click on the call stack entry.
I'm using a recently debugger branch nightly build.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version