Hello,
I would like to retrieve the basic type, array size, and physical address of global C variables.
I'm using ccs4 for the C2000 family.
As an example take the following C program:
unsigned int testvar[2];
void main(void) { testvar[0]++; }
I compile with "Full symbolic debug (--symdebug:dwarf, -g)"When I parse the .out file with
ofd2000.exe -gv -o project.xml -x project.out
I can't find the symbol infos related to the variable testvar?!
Thanks in advance for any hints.
The output of ofd2000 should have something that shows the address of testvar. I don't believe it directly shows the size of array though and that may be something you'd need to compute from the symbol table using a script or something similar.
If a post answers your question please mark it with the "Verify Answer" button
Search the wikis for common questions: CGT, BIOS, CCSv3, CCSv4Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box
I almost solved my problem. The last issue concerns two-dimensional arrays e.g.
int table[3][4]
The dwarf information shows only DW_AT_byte_size (which in fact is Word size) and equals 12 for the example before.
But I don't know how to retrieve row and column dimensions from the dwarf info??
The Dwarf array information, that includes the DW_AT_byte_size information you found, should appear similar to this ...
TI C/C++ Compiler Forum ModeratorPlease click Verify Answer on the best reply to your question.The Compiler Wiki answers most common questions.Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.