-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-13324
-
-
-
default
-
Using tools such as the TI name utility, TI object file dump tool, or readelf can be used to generate a symbol table list from an object file or executable file if built with debug enabled.
The current issue involves symbol table FILE entries that are not the original C/C++ source file name. Instead the symbol table FILE entry could be file.asm (for original file.c) or some temporary file name like TIbJlZug6OO.
The bug fix changes above behavior to instead use the original source file name for the symbol table FILE entry if the compile had debug enabled. Existing behavior will still occur without debug enabled.
More background
When compiling C/C++ files, eg: file.cpp, the TI compiler will input a temp file name or assembly file name for the symbol table's file entry instead of original C/C++ source name.
For example, compiling file.cpp will result in object file with this symbol table entry for the source file:
id name value kind section binding type -- ---- ----- ---- ------- ------- ---- 1 TIcfNGslE8j 0x00000000 absolute N/A local file
Above file name, TIcfNGslE8j, is a temporary assembly file created by the compiler to pass the generated assembly from the codegen to the assembler.
When compiling using -k or -s options (to retain the generated assembly file), the TI compiler will instead use the retained temporary assembly file name in the symbol table entry:
id name value kind section binding type -- ---- ----- ---- ------- ------- ---- 1 file.asm 0x00000000 absolute N/A local file
This bug fix will update above behavior to instead use the original source file name. For example:
id name value kind section binding type -- ---- ----- ---- ------- ------- ---- 1 file.cpp 0x00000000 absolute N/A local file
However, using option --symdebug:none will still result in symbol table file entry using the temp file name or if combined with -k, the symbol table file entry will be file.asm like below example shows :
--symdebug:none id name value kind section binding type -- ---- ----- ---- ------- ------- ---- 1 TIcfNGslE8j 0x00000000 absolute N/A local file --symdebug:none --keep_asm id name value kind section binding type -- ---- ----- ---- ------- ------- ---- 1 file.asm 0x00000000 absolute N/A local file