On updating to xcode 11.3 while debugging Step Over(f6) started behaving similar to Step Into(f7).
Steps to Reproduce
Create a new Xcode project for macOS Command line Tool
Change main.cpp with this
#include <iostream> void test() { std::cout<<"test"; } int main(int argc, const char * argv[]) { test(); return 0; }
go to project build settings and add
-Wl,-no_function_starts
to 'Other Linker Flags'Add breakpoint to the line where
test
function is called and start debuggingwhen breakpoint is hit try to Step Over(f6)
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?