I am trying to fetch the register info for each of the General purpose registers in ARM.
For example, When we have a seg. fault, we create a core dump and from that we can examine, register info, for example: info register r0 and the assembly code using diassemble.
I did try the following link
This is the following error I get: file format not recognized; treating as linker script
Could it be that the way I am linking is wrong?
gcc -g -std=c99 -O2 -mthumb -S -march=armv7 -mthumb-interwork -static -ffunction-sections -O0 foo.c -c -o foo.o
gcc -g -std=c99 -mthumb -march=armv7 -mthumb-interwork -static -ffunction-sections -O0 foo.o -o foo
I saw one answer by Nils Pipenbrinck, but I did not understand how he fetched the register info.
Could you please tell me how do I get the register info?