Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8596573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:42:41+00:00 2026-06-12T00:42:41+00:00

We have a strange error with our debuggers when running the debugger on a

  • 0

We have a strange error with our debuggers when running the debugger on a phone in release mode. Whether we are using gdb or lldb with xcode 4.3.3, the code will land on breakpoints even though the code’s PC is not really pointing at that spot.

Example fake code:

if (true) {
    // set breakpoint-A here
} else {
    // set breakpoint-B here
}

// set another breakpoint-C here.

It will land in breakpoint-B and then jump to breakpoint-A.

Is the cause because we are in “release” mode and it’s optimizing?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:42:42+00:00Added an answer on June 12, 2026 at 12:42 am

    Yes, there are three things going on here: When you build in release mode, the compiler is doing optimized code generation. The compiler may change the order that source lines are compiled into the program (as long as it doesn’t change the meaning of the code), instructions between different source lines may be intermixed or rearranged, and finally there can be problems with the line table that the compiler emits.

    Imagine two source lines, each which turn in to 8 assembly language instructions. The compiler may rearrange these 16 instructions (as long as it doesn’t change the results of them) to keep the CPU(s) running most efficiently. But in this situation, what instruction should the compiler say is equivalent to line 1? and what instruction should the compiler say is equivalent to line 2?

    With optimized code debugging, if you’re debugging at a source code level, you have to live with the reality that the “currently executing source line” is going to bounce around a lot while you step through your program. Variables that seem to be in scope will appear and disappear at nonobvious times. The compiler’s ways are tricky and hard to understand. You need to debug with the assembly language code in front of you (or a source + assembly display) to really follow what’s happening.

    There are improvements that compilers and debuggers can make to improve optimized code source-level debugging but it will probably always be a little hard to follow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started getting a very strange error when using jQueryMobile for my
I am getting a strange error using jQuery 1.3.2 and Firefox. I have created
I have a strange problem, where localization is working great, except on our error
We have a strange issue with running an Facebook IFrame application (using MVC 2).
I have strange error and not sure how to tackle it without wasting too
I have a strange error where my jquery ajax request doesn't submit all the
I have this strange error, When I call $element_attrs = $element -> attributes(); I
I have come across a strange error. I have an Android project that uses
I experience strange problem. We have error handling in global.asax that would redirect user
it is very strange, because this error doesn't happen all the time... I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.