Author Topic: how to debug a wxwidgets application in codeblocks?  (Read 7148 times)

Offline HScui

  • Single posting newcomer
  • *
  • Posts: 6
how to debug a wxwidgets application in codeblocks?
« on: March 06, 2013, 11:00:07 am »
Hello,I have confused these days.I can debug simple c++ console projects,
but can't debug wxWidgets app.

I download wxMSW2.8.12.

compile it:
mingw32-make -f makefile.gcc BUILD=debug SHARED=1 MONOLITHIC=1
UNICODE=1 CXXFLAGS=-fno-keep-inlline-dllexport

Then I just use the wxsmith create a app.
It can run, but can't  debug.

and gdb shows:
warning:while parsing target library list: not well-formed

os:win7
cb:12.11
gcc <tdm-1>4.7.1
gdb 7.5

can anyone give me some tips?
appreciate!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: how to debug a wxwidgets application in codeblocks?
« Reply #1 on: March 06, 2013, 12:34:32 pm »
Have you tried Debug -> Start inside C::B?
(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 HScui

  • Single posting newcomer
  • *
  • Posts: 6
Re: how to debug a wxwidgets application in codeblocks?
« Reply #2 on: March 06, 2013, 01:57:55 pm »
Have you tried Debug -> Start inside C::B?

I did,it just stop there:
Code
...
D:/M_C/codeblocks/wxWidgets/wx9_test1/bin/Debug/wx9_test1.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 6276

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: how to debug a wxwidgets application in codeblocks?
« Reply #3 on: March 06, 2013, 02:02:17 pm »
Please enable the full log for the debugger in the settings and try again. Then post the log.
(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 HScui

  • Single posting newcomer
  • *
  • Posts: 6
Re: how to debug a wxwidgets application in codeblocks?
« Reply #4 on: March 06, 2013, 02:22:15 pm »
I made a mistake!It can debug,just need a long time to wait.

Thanks !oBFusCATed.
Sorry for wasting your time.
[
Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\M_C\codeblocks\wxWidgets\wx9_test1\
Adding source dir: D:\M_C\codeblocks\wxWidgets\wx9_test1\
Adding file: D:\M_C\codeblocks\wxWidgets\wx9_test1\bin\Debug\wx9_test1.exe
Changing directory to: D:/M_C/codeblocks/wxWidgets/wx9_test1/.
Set variable: PATH=.;C:\cbprj\wxWidgets-2.9.4\lib\gcc_dll;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;c:\Altera\11.0\quartus\bin;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\doxygen\bin;C:\Program Files\MATLAB\R2011b\runtime\win32;C:\Program Files\MATLAB\R2011b\bin;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Lingo;D:\M_C\svn\bin;C:\Program Files\Rational\Common;c:\Altera\11.0\modelsim_ae\win32aloem;C:\Windows\system32

[debug]Command-line: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args D:/M_C/codeblocks/wxWidgets/wx9_test1/bin/Debug/wx9_test1.exe
[debug]Working dir : D:\M_C\codeblocks\wxWidgets\wx9_test1

Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args D:/M_C/codeblocks/wxWidgets/wx9_test1/bin/Debug/wx9_test1.exe
done

[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!

Setting breakpoints

[debug]Reading symbols from D:\M_C\codeblocks\wxWidgets\wx9_test1\bin\Debug\wx9_test1.exe...
[debug]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 disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory D:/M_C/codeblocks/wxWidgets/wx9_test1/
[debug]Source directories searched: D:/M_C/codeblocks/wxWidgets/wx9_test1;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: D:\M_C\codeblocks\wxWidgets\wx9_test1\bin\Debug\wx9_test1.exe

Child process PID: 2468

[debug][New Thread 2468.0x1f60]
[debug][New Thread 2468.0x1144]
[debug][New Thread 2468.0x1de8]
[debug][Inferior 1 (process 2468) exited normally]
[debug]>>>>>>cb_gdb:

[Inferior 1 (process 2468) exited normally]

[debug]> quit

Debugger finished with status 0
« Last Edit: March 06, 2013, 02:28:25 pm by HScui »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: how to debug a wxwidgets application in codeblocks?
« Reply #5 on: March 06, 2013, 02:35:41 pm »
OK, don't worry much. Good to know it works :)
(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!]