• 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
Re: problem debugging scripting addition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem debugging scripting addition


  • Subject: Re: problem debugging scripting addition
  • From: "Mark Wagner" <email@hidden>
  • Date: Tue, 27 Mar 2007 11:32:29 -0700

On 3/26/07, Nigel Redmon <email@hidden> wrote:
I'm writing a scripting addition, and seeing problems when stepping
through the code. I don't think it has anything to do with the code
itself--I've noticed that "skeleton addition" from TN1164 exhibits
the same quirks. It's setup for debugging, and I just run it "out of
the box" with similar problems.

I build my scripting addition, copy it to ~/Library/
ScriptingAdditions, set breakpoints, and debug executable. Script
Editor is the custom executable. I can break on the scripting
addition's start code, or set breakpoints in my commands, and I break
into the debugger, but the "current line" that the source pane shows
may be a line after a breakpoint, and sometimes appears to have
skipped breakpoints ahead of it. When I look at the assembly listing,
it's obvious that  the source isn't in sync. Stepping through the
code at that point may jump back to statements before it in the
source pane (the assembly pane steps through fine, of course). For
example, say I set a breakpoint on the fifth executable line of a
subroutine. it may appear to break into the debugger on that line,
but the assembly listing indicates that I'm well before the indicated
current source line. If I "step over", the current source line may
back up a few statements, and subsequent steps seem to jump around in
the source, maybe getting to my breakpoint statement two or three
times until it's "really" there (that is, the current position in the
assembly pane agrees with the current position in the source pane).

Are you compiling with optimization turned on? This behavior is a common result of debugging optimized code, because one of the things the compiler does when optimizing is re-ordering parts of statements so the CPU can execute them more efficiently.

--
Mark Wagner
_______________________________________________
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: problem debugging scripting addition
      • From: Nigel Redmon <email@hidden>
References: 
 >problem debugging scripting addition (From: Nigel Redmon <email@hidden>)

  • Prev by Date: FxPlug filter conflicts with multiple filters installed.
  • Next by Date: Re: problem debugging scripting addition
  • Previous by thread: problem debugging scripting addition
  • Next by thread: Re: problem debugging scripting addition
  • Index(es):
    • Date
    • Thread