0

I used T32 to load bin files and elf and wrote scripts to extract the Pc , Lr register values from the ELF file. Now I have the address for e.g say PC's address is 0xccccdddd. Now I need to get the symbol corresponding to that. I ran gdb and used gdb info symbol 0xccccdddd and got the symbol name. But I need to know if there is any command in T32 itself to get the symbol name. Or can I get the symbol name from some commands like readelf or objdump. Thanks in advance.

user00011
  • 103
  • 1
  • 15

1 Answers1

2

The command to open a window to see all the static symbols is

sYmbol.Browse

To learn more about that window, I recommend to check the "Training HLL Debugging" (training_hll.pdf) from your TRACE32 installation.

To get only the symbol related to one single address use the PRACTICE function sYmbol.Name(<addr>). Functions have to be used together with a command. To simply display the name use the command PRINT.

E.g.:

PRINT sYmbol.Name(P:0xccccdddd)

Note that the address-offset has to be prefixed by an access class. Usually the access class "P:" stands for program memory, while "D:" stands for data memory. See the "Processor Architecture Manual" for more CPU specific access classes (Menu > Help > Processor Architecture Manual)

Holger
  • 3,920
  • 1
  • 13
  • 35
  • What if i need to get the symbol name of a variable say symbol name of PC.I used v.v pc to get the address and then passed the address to sYmbol.Name(P:address). How can i directly pass the variable name to that – user00011 Oct 12 '18 at 05:17
  • When you write "PC", do you mean the program counter register or a variables named "pc"? – Holger Oct 12 '18 at 12:08
  • If you have already the name of a variable, why should you put it in sYmbol.NAME()? What result do you expect from doing so? – Holger Oct 12 '18 at 12:17