Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

Debugger initialization commands to debug in wxWidgets

<< < (7/7)

oBFusCATed:
Lets see if they approve it and you have the nerves to fill in the FSF Copyright assignment :)

ollydbg:

--- Quote from: oBFusCATed on June 14, 2011, 08:32:08 am ---Lets see if they approve it and you have the nerves to fill in the FSF Copyright assignment :)

--- End quote ---
Aha, indeed nerves :D.

By the way, I have create another patch to let the backtrace showing the full file name when debugging wx debug library. This way, it can fix the problem I post here: http://forums.codeblocks.org/index.php/topic,14792.msg99218.html#msg99218

see:

--- Quote ---> bt 30
#0  test_debug_wx_libFrame::OnAbout (this=0xb77570, event=...) at f:\cb\test_code\test_debug_wx_lib\test_debug_wx_libmain.cpp:103
#1  0x66d41acc in wxAppConsole::HandleEvent (this=0xb69fa0, handler=0xb77570, func=(void (wxEvtHandler::*)(wxEvtHandler * const, wxEvent &)) 0x401e66 <test_debug_wx_libFrame::OnAbout(wxCommandEvent&)>, event=...) at d:\code\wxwidgets-2.8.12\src\common\appbase.cpp:322
#2  0x66dc1107 in wxEvtHandler::ProcessEventIfMatches (entry=..., handler=0xb77570, event=...) at d:\code\wxwidgets-2.8.12\src\common\event.cpp:1239
#3  0x66dc1734 in wxEvtHandler::SearchDynamicEventTable (this=0xb77570, event=...) at d:\code\wxwidgets-2.8.12\src\common\event.cpp:1421
#4  0x66dc12ad in wxEvtHandler::ProcessEvent (this=0xb77570, event=...) at d:\code\wxwidgets-2.8.12\src\common\event.cpp:1297
#5  0x66e7be55 in wxFrameBase::ProcessCommand (this=0xb77570, id=101) at d:\code\wxwidgets-2.8.12\src\common\framecmn.cpp:224
#6  0x66e248f8 in wxFrame::HandleCommand (this=0xb77570, id=101, cmd=0, control=0x0) at d:\code\wxwidgets-2.8.12\src\msw\frame.cpp:974
#7  0x66e24c1e in wxFrame::MSWWindowProc (this=0xb77570, message=273, wParam=101, lParam=0) at d:\code\wxwidgets-2.8.12\src\msw\frame.cpp:1051
#8  0x66e05ad6 in wxWndProc (hWnd=0x12052c, message=273, wParam=101, lParam=0) at d:\code\wxwidgets-2.8.12\src\msw\window.cpp:2618
#9  0x7e418724 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
#10 0x0012052c in ?? ()
#11 0x00000111 in ?? ()
warning: (Internal error: pc 0x110 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x110 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x110 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x64 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x64 in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x64 in read in psymtab, but not in symtab.)
#12 0x00000065 in ?? ()
#13 0x00000000 in ?? ()
>>>>>>cb_gdb:

--- End quote ---
Now, double click on the call stack window will open the associated wx source file.

here is the patch

--- Code: ---569a0e63c18e2fe9dfa82e7feaf51b191669ded4
 gdb/stack.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gdb/stack.c b/gdb/stack.c
index 0888b69..9635e57 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -835,15 +835,21 @@ print_frame (struct frame_info *frame, int print_level,
   ui_out_text (uiout, ")");
   if (sal.symtab && sal.symtab->filename)
     {
+      const char *fullname;
       annotate_frame_source_begin ();
       ui_out_wrap_hint (uiout, "   ");
       ui_out_text (uiout, " at ");
       annotate_frame_source_file ();
-      ui_out_field_string (uiout, "file", sal.symtab->filename);
-      if (ui_out_is_mi_like_p (uiout))
- {
-  const char *fullname = symtab_to_fullname (sal.symtab);
+      
 
+ fullname = symtab_to_fullname (sal.symtab);
+        if (fullname != NULL)
+           ui_out_field_string (uiout, "file", fullname);
+        else
+           ui_out_field_string (uiout, "file", sal.symtab->filename);
+        
+        if (ui_out_is_mi_like_p (uiout))
+ {
   if (fullname != NULL)
     ui_out_field_string (uiout, "fullname", fullname);
  }

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version