1

On updating to xcode 11.3 while debugging Step Over(f6) started behaving similar to Step Into(f7).

Steps to Reproduce

  1. Create a new Xcode project for macOS Command line Tool

  2. Change main.cpp with this

    #include <iostream>
    void test() {
        std::cout<<"test";
    }
    
    int main(int argc, const char * argv[]) {
        test();
        return 0;
    }
    
  3. go to project build settings and add -Wl,-no_function_starts to 'Other Linker Flags'

  4. Add breakpoint to the line where test function is called and start debugging

  5. when breakpoint is hit try to Step Over(f6)

  6. It behaves as Step Into(f7) and moves into the test function instead of going to the next return statement.


removing -no_function_starts flag solves the problem

But I want to know why was the flag used? Its description here says

-no_function_starts
By default the linker creates a compress table of function start addresses in the LINKEDIT of final linked image. This option disables that behavior.

what is the importance of this table of function start addresses and why would someone disable it? How is it impacting xcode behaviour of step over?

  • While it could be nice to learn what this option does, or rather what the compressed function start table does, I suggest you ask about your problem directly instead. Please create a [mcve] to show us, and tell us what problem you have with it. You can add that removing this option helped solve it and ask for more information about it, but keep the question focused on the problem you have itself. Please refresh [how to ask good questions](http://stackoverflow.com/help/how-to-ask) as well as [this question checklist](https://codeblog.jonskeet.uk/2012/11/24/stack-overflow-question-checklist/). – Some programmer dude Feb 07 '20 at 04:53
  • @Someprogrammerdude Thanks for pointing it out, I have tried to incorporate your suggestions. – Jaswant Singh Ranawat Feb 07 '20 at 08:24

0 Answers0