how to debug into wxwidget source code? Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
ollydbg23
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 200
Joined: Fri Dec 12, 2008 10:31 am

how to debug into wxwidget source code?

Post by ollydbg23 » Fri Dec 12, 2008 10:55 am

Hi,I'm new to this forum.
When I'm debugging a wxwidget project. (I'm using windows, and installed code::blocks and wxpack), the project is linked with "libwxmsw28ud.a" and it works fine. But When I set a breakpoint on a message handler, then click the "call stack" window to locate a function named "wxWndProc...", it reported that "Cannot open file: D:\src\msw\window.cpp" .

see here:
Image

surely the debugger can't find these files , because wxpack was installed in "D:\SourceCode\Libraries\wxWidgets2.8..".

So, my question is "how to set code::blocks to let it know the path of wxWidget source file like window.cpp"? I can step into the source

Thanks.
Attachments
Snap1.jpg
snap shot of debugging

Grrr
Earned some good credits
Earned some good credits
Posts: 126
Joined: Fri Apr 11, 2008 8:48 am
Location: Netherlands

Post by Grrr » Fri Dec 12, 2008 2:11 pm

You use precompiled libraries. The debug information in these libraries point to the sources files that were used to create them. Not to where YOU have installed them.

Things you can do
- Compile wx sources yourself with debug information, so that the debugger can find the sources.
- Install wxPack in the location where the debugger is looking (that seems to be D:\ in your case).
- Create a link to the actual location of the sources.

ollydbg23
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 200
Joined: Fri Dec 12, 2008 10:31 am

Post by ollydbg23 » Sat Dec 13, 2008 4:42 am

Grrr wrote:You use precompiled libraries. The debug information in these libraries point to the sources files that were used to create them. Not to where YOU have installed them.

Things you can do
- Compile wx sources yourself with debug information, so that the debugger can find the sources.
- Install wxPack in the location where the debugger is looking (that seems to be D:\ in your case).
- Create a link to the actual location of the sources.
Thanks for your reply.
So, you give me three methods. I'm not sure how to use the third method? How to create a link to the source. Does it can be done by some options in Code::blocks?
:D

ollydbg23
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 200
Joined: Fri Dec 12, 2008 10:31 am

Post by ollydbg23 » Sat Dec 13, 2008 12:59 pm

HI, Grrr, it seems that your first method doesn't works.
I manually compiled the wxWidgets follow the steps in
http://wiki.codeblocks.org/index.php?ti ... wsQuickRef

I installed wxWidget in D:\wxWidgets-2.8.9, and in codeblocks, I set the variable wx to D:\wxWidgets-2.8.9, then I'm trying to debug into the source code, I meet the same error. see the screen shot below.
Image

In fact that the source file was in D:\wxWidgets-2.8.9\src\msw

It's so annoying, and it seems that the GDB debugger can't locate the wxWidget source file.

Can someone still help me?

Thanks for any hint.


The question haven't been solved. but to avoid a message prompt every time I enter to this forum, i just press "accept" to remove this message prompt.
Attachments
Snap1.jpg

Post Reply