- Tue Jun 30, 2015 10:50 am
#22064
Cal,
Did not see this topic so continue my (offtopic for Re: Anybody interested in using a debugger) question here.
I already found the objdump -d -z option to get but have trouble to understand the output.
My goal is to get the SDK version number from dissembling the libmain.a.
Expected this to be possible as I hope the system_get_sdk_version is "just returning a string" and does not any fancy calculation to get the version number.
I found the system_get_sdk_version in user_interface.o, the part I thought to be relevant :
sdk111 :
Code: Select all 2eca: 1c0000 excw
2ecd: 000000 ill
00002ed0 <system_get_sdk_version>:
2ed0: ffff21 l32r a2, 2ecc <system_uart_de_swap+0x38>
2ed3: f00d ret.n
sdk110
Code: Select all 2a5b: 001c00 excw
2a5e: 210000 srai a0, a0, 0
00002a60 <system_get_sdk_version>:
2a60: ffff21 l32r a2, 2a5c <system_uart_swap+0x7c>
2a63: f00d ret.n
However this looks like a very small function.
As far my reading the "l32r a2, 2a5c" goes, the instruction reads from the address 2a5c to register a2.
and this address 2a5c is just before the function.
then ret.n returns that to the caller.
But I am failing to see the "1.1.1" vs "1.0.1" (or coded) in this part of data/code so either I am mistaken in the way the instruction work or I am on a deadend in the way I wanted to get the version number from the library.
Can you indicate whether I a have wrong interpretation and/or point me to some further reading which might help me ?