• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't trace into an Obj-C call?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't trace into an Obj-C call?


  • Subject: Can't trace into an Obj-C call?
  • From: Rick Mann <email@hidden>
  • Date: Tue, 13 Nov 2007 11:10:07 -0800

So, I'm new to Obj-C, but so far my experience is not winning me over. This problem may be more in Xcode than in the language.

I have this:

1 showChartInspector: (id) inSender
2 {
3 if (mChartInspectorController == NULL)
4 {
5 mChartInspectorController = [[NSWindowController alloc] initWithWindowNibName: @"ChartInspector"];
6
7 [mChartInspectorController setWindowFrameAutosaveName: @"ChartInspector"];
8 }
9
10 [self testFoo];
11 }
12
13
14 - (void)
15 testFoo
16 {
17 [mChartInspectorController showOrHideWindow];
18 }


If I put a breakpoint on line 10, and then use the debugger to Step Into (Control-T in my bindings), first it steps past that, then it steps into all the message send glue, and then I get lost, and it never seems to step into the method.

CodeWarrior had a setting for "Don't step into glue code" that was very convenient.

However, something else is going on. If I put an additional breakpoint on line 17, and Continue from line 10, then the stack at line 10:

#0 0x00001de5 in -[STXAppDelegate showChartInspector:] at STXAppDelegate.m:68
#1 0x94091f94 in -[NSApplication sendAction:to:from:]
#2 0x94140868 in -[NSMenu performActionForItemAtIndex:]
#3 0x9414056d in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
#4 0x941401f2 in -[NSMenu performKeyEquivalent:]
#5 0x9413ea99 in -[NSApplication _handleKeyEquivalent:]
#6 0x9405be4e in -[NSApplication sendEvent:]
#7 0x93fb9705 in -[NSApplication run]
#8 0x93f869ba in NSApplicationMain
#9 0x00001bce in start



Changes to this at line 17:

#0 0x00001dfd in -[STXAppDelegate testFoo] at STXAppDelegate.m:75
#1 0x94091f94 in -[NSApplication sendAction:to:from:]
#2 0x94140868 in -[NSMenu performActionForItemAtIndex:]
#3 0x9414056d in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
#4 0x941401f2 in -[NSMenu performKeyEquivalent:]
#5 0x9413ea99 in -[NSApplication _handleKeyEquivalent:]
#6 0x9405be4e in -[NSApplication sendEvent:]
#7 0x93fb9705 in -[NSApplication run]
#8 0x93f869ba in NSApplicationMain
#9 0x00001bce in start



Which is not what I would expect. I would expect to see a line for showChartInspector between #0 and #1 in the second stack. Is this Xcode being bad, or is this something inherent in the Obj-C call mechanism? I hope it's the former, because the latter seems less than useless. If it's the former, how do I fix it?


Thanks!

--
Rick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Can't trace into an Obj-C call?
      • From: Dave Camp <email@hidden>
  • Prev by Date: Re: Spin Control can't sample unresponsive Xcode 3
  • Next by Date: Re: Can't trace into an Obj-C call?
  • Previous by thread: Re: Spin Control can't sample unresponsive Xcode 3
  • Next by thread: Re: Can't trace into an Obj-C call?
  • Index(es):
    • Date
    • Thread