From: Brian M. <ma...@ex...> - 2008-04-08 14:00:56
|
I'm writing some text about how to debug RubyCocoa programs. In particular, I'm trying to help people who've done something wrong that leads to a blowup down in some NSClass. For example, suppose I use textfield.intValue to set text in some NSTextView, rather than textfield.stringValue. That leads to this error: 2008-04-08 08:46:46.314 Flat Fenestration[27099:10b] *** -[NSCFNumber length]: unrecognized selector sent to instance 0x730db0 2008-04-08 08:46:46.330 Flat Fenestration[27099:10b] FenestrationController#chooseWebapp: OSX::OCException: NSInvalidArgumentException - *** -[NSCFNumber length]: unrecognized selector sent to instance 0x730db0 The problem is that somewhere something is trying to take the length of an integer object. GDB 'backtrace' produces a trace of ObjC message sends that could be, in theory, useful. In this case, it isn't. But it might be if I could get descriptions of the args. I can't do that with the standard libraries: (gdb) frame 20 #20 0x946d81a8 in -[NSView interpretKeyEvents:] () (gdb) info args No symbol table info available. I was hoping I would get more information if I used the _debug versions of the frameworks (as set in the executable's General Info pane under "Use ______ suffix when loading frameworks" but all that produces is a flood of these messages: warning: Could not find object file "/var/tmp/Libm/Libm-287.1~6/ Libm.build/Libm_debug.a.build/Objects-normal/i386/xmm_arcsincostan.o" - no debug information available for "/SourceCache/Libm/Libm-287.1/ Source/Intel/xmm_arcsincostan.c". ... and the same lack of symbol table information. I am wondering if it's worth continuing to try to dig for useful things you can do with GDB. Are there any? ----- Brian Marick, independent consultant Mostly on agile methods with a testing slant www.exampler.com, www.exampler.com/blog, www.twitter.com/marick |