• 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: Debugger Balking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger Balking


  • Subject: Re: Debugger Balking
  • From: Nick Nallick <email@hidden>
  • Date: Wed, 18 Jan 2006 12:42:58 -0700

On Jan 18, 2006, at 9:06 AM, Chris Jefferson wrote:

On 1/18/06, Nick Nallick <email@hidden> wrote:
I'm trying to step through my code line by line in the debugger,
occasionally stepping into a function.  I've come to a place in my
code where the debugger refuses to continue.  When I try to step into
or over a particular function the status bar says "GDB Stopped after
step", my app starts consuming 100% of the CPU (on a DP system), and
the debugger just refuses to go any further.  The various step and
continue buttons can be clicked but don't appear to do anything.  The
console shows a (gdb) prompt but when I enter a command (e.g., print)
nothing happens.  The only thing I can do is terminate my app.  If I
try again and set a breakpoint a few lines further down I break at
that point but then get the same behavior.


I've found this problem if compiling with any optimisation flags. Make sure you have optimisation set to -O0 (checking compiling really is happening without optimisation, go to the build results screen, and click the button to show the commands actually passed to the compiler).

Chris

I think optimization is turned off unless there's something sneaky somewhere I'm unaware of (which is always possible). My project and target both have the optimization set to -O0. From the build results screen I found the following settings that seemed related.


    setenv GCC_OPTIMIZATION_LEVEL 0
    setenv OPTIMIZATION_CFLAGS -O0
    setenv OPTIMIZATION_LEVEL 0

FWIW, I was trying to step through the code in parallel between PPC and Intel machines. I was able to debug the same project on Intel without this problem (although it had other problems mainly with single step acting like continue sometimes). In general my debugging experience seems flakey, which might point to optimized code, but if that's the case I sure can't figure out where the setting is coming from.

Nick


_______________________________________________ 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
References: 
 >Debugger Balking (From: Nick Nallick <email@hidden>)
 >Re: Debugger Balking (From: Chris Jefferson <email@hidden>)

  • Prev by Date: Intel assembly questions
  • Next by Date: Re: Intel assembly questions
  • Previous by thread: Re: Debugger Balking
  • Next by thread: Re: Debugger Balking
  • Index(es):
    • Date
    • Thread