// The map and COD files are generated at the end
Run debugProgramThe error message is as follows:
1. The error address is 0x00413202.
Search 00413 in the map file:
2. Find the largest 0x4131e0 value smaller than 0x00413202, and the function name is crashtest.
3. the offset of the crash address to the function address is 0x00413202-0x41_e0 = 0x22.
Find the crashtest function in the cod file where the function is located:
4. Check the row 0x22.
5. You can see error statements or even error operations.
----------------------------------------
To generate map and COD files, you must modify the debugging project settings. Take vs2008 as an example:
1. Set linker-debugging-generate map file to yes.
2. Set C/C ++-output files-assembler output to assembly, machine code and source (/FACS)
Note: The cod file is in the temporary compilation folder, along with the OBJ file.
-----------------------------------------
Reference:
Http://www.vckbase.com/document/viewdoc? Id = 908
Http://www.vckbase.com/document/viewdoc? Id = 1473