• 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: gdb not breaking on break statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb not breaking on break statements


  • Subject: Re: gdb not breaking on break statements
  • From: Fritz Anderson <email@hidden>
  • Date: Sat, 10 Nov 2007 08:14:16 -0600

On 8 Nov 2007, at 7:28 PM, Steve Checkoway wrote:

On Nov 8, 2007, at 4:44 PM, Jason Molenda wrote:

As far as the debugger knows, line 7 is a blank line or a comment or something like that. Even though this is compiled without optimization, the way that the compiler generates assembly for this source code is not exactly what you might have expected. The older compilers that you compared against may have generated code in a different way, or possibly you were comparing a ppc compiler which would result in different codegen.

I was seeing the same behavior on ppc as intel. The real code I was working with was more complex, of course, but it amounted to if some complex condition, then break. I wanted to understand what was causing the code to break out of the loop early. Is there a better way to do that other than insert something like asm volatile ( "nop \n" ) before my break statements?

If the condition is not unmanageably complex, you could set the breakpoint at the if (), and make it conditional on the condition. Or you could put the condition into a variable, and make the break conditional on that.


	— F

Are there enough conditions in that?

_______________________________________________
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: gdb not breaking on break statements
      • From: Jeffrey Oleander <email@hidden>
References: 
 >gdb not breaking on break statements (From: Steve Checkoway <email@hidden>)
 >Re: gdb not breaking on break statements (From: Jason Molenda <email@hidden>)
 >Re: gdb not breaking on break statements (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: java reference
  • Next by Date: Noob - Embedded helper application
  • Previous by thread: Re: gdb not breaking on break statements
  • Next by thread: Re: gdb not breaking on break statements
  • Index(es):
    • Date
    • Thread