Topic: https://github.com/MicrosoftDocs/cpp-docs/issues/2278
mentioned that the _penter function must compile along,
I countered another problem,
I need to use functions from other libraries in _penter function, for example
void myfunc(){
// function from dbghelp.lib
SymFromAddr(GetCurrentProcess(), dwAddr, &dwDisplacement, pSymbol);
}
_penter(){
... // save registers
myfunc();
... // pop registers
}
I have compiled this file along, event tried to compile a static library(containing dbghelp.lib).
Both way, when the program runs, SymFromAddr would trigger _penter, which causing a stack overflow.
Is there a way to told the compiler not to trigger _penter in the following function calls?
gcc's way:
attribute((no_instrument_function))