Hi,
how can I set a linker option to get a map file output including local symbols?
I'm using MinGW as the standard compiler in codeblocks.
Here is a code snipped of a simple console app named "Test":
#include <iostream>
using namespace std;
int iGlobalVar;
static int iStaticVar;
int main()
{
cout << "Hello world!" << endl;
iGlobalVar = 4;
iStaticVar = iGlobalVar / 2;
iGlobalVar = iStaticVar + 1;
return 0;
}
How can i get a both symbols, iStaticVar and iGlobalVar, to be output in a map file?
So far I tried:
"ld.exe .\bin\Debug\Test.exe -M > Symbol.map"
The global symbol "iGlobalVar" occures in the map file, but I could not find an option to get the local symbol to be output in that file.
I need this feature to implement a simple debugger.
I build the debug target of my application, which has an interface to view and modify symbols without the codeblocks IDE.
Any help appreciated!