Note that there are some explanatory texts on larger screens.

plurals
  1. PODebugging MacOSX Cocoa applications with command line gdb (without XCode)
    primarykey
    data
    text
    <p>I use a cross platform toolkit which wraps Objective-C so i do not/can not use XCode. Just the pure command line and plain old makefiles.</p> <p>I compile my source code with "gcc -Wall -g -O0 " but when running it under gdb control i do not get the stack frames or valid source code lines.</p> <p>First: What can i do to get this work. Second: How can i use XCode (3.0) giving me a GUI frontend for gdb.</p> <p>This is what i get when setting a breakpoint and doing a "backtrace" gdb command</p> <pre><code>0 0x918194a9 in malloc_error_break () #1 0x91814497 in szone_error () #2 0x9173e523 in szone_free () #3 0x9173e38d in free () #4 0x000d3c53 in Agui_Paint_Context::checkFontColor () #5 0x000b2c81 in Agui_Color_Button::attribute_table () #6 0x000e5b2e in Agui_Scroll_Canvas_Scrolling_Mixin::~Agui_Scroll_Canvas_Scrolling_Mixin () #7 0x000e8968 in Agui_Scroll_Canvas_Scrolling_Mixin::~Agui_Scroll_Canvas_Scrolling_Mixin () #8 0x000e8cd9 in Agui_Scroll_Canvas_Scrolling_Mixin::~Agui_Scroll_Canvas_Scrolling_Mixin () #9 0x93325e8f in -[NSApplication sendAction:to:from:] () #10 0x93325dcc in -[NSControl sendAction:to:] () #11 0x93325c52 in -[NSCell _sendActionFrom:] () #12 0x933252ab in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] () #13 0x93324afe in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] () #14 0x933243b8 in -[NSControl mouseDown:] () #15 0x93322af7 in -[NSWindow sendEvent:] () #16 0x932ef6a5 in -[NSApplication sendEvent:] () #17 0x0008dc6e in Agui_Attribute_Type_Boolean::~Agui_Attribute_Type_Boolean () #18 0x9324cfe7 in -[NSApplication run] () #19 0x0008e6b7 in Agui_Attribute_Type_Boolean::~Agui_Attribute_Type_Boolean () #20 0x0003faba in ?? () #21 0x00073ddd in ?? () #22 0x0007c996 in ?? () #23 0x00004bb2 in ?? () #24 0x00002d76 in ?? () (gdb) </code></pre> <p>The "Agui_" functions do exist but they are totally wrong. It looks like the file/line association is broken. So i have to fix first before i get any valid GUI support from XCode.</p> <p>UPDATE: Ok, i was able to setup a project and debug the application from inside XCode but this is not what i really want. The command line debugging still doesn't work even when i changed -g now with -gdwarf-2</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload