how to get information from ARM register when system crash

1

Pre-condition:

I use ARM11 processor, armcc-4.1 compiler, threadx OS, T32 for debugger

My target processor is ARM11 and sometimes after the system go to crash, the OS will provide some stack information, for some crash, it shows like:

 [20:44:54.6]  Trap Class: 0xAAAA (HW DATAABORT TRAP)
 [20:44:54.6]  System Stack: 
 [20:44:54.6]   0x600DB570
 [20:44:54.6]   0x00000000
 [20:44:54.6]   0x00000000
 [20:44:54.6]   0x00000000
 [20:44:54.6]   0x00000000
 [20:44:54.6]   0x00000000
 [20:44:54.6]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.7]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.8]   0x00000000
 [20:44:54.9]   0x00000000
 [20:44:54.9]   0x00000000
 [20:44:54.9]   0x00000000
 [20:44:54.9]   0x600DB8A0
 [20:44:54.9]   0x600CF2E8
 [20:44:54.9]   0xE5920004
 [20:44:54.9]   0x60013C20
 [20:44:54.9]   0x602FF288
 [20:44:54.9]   0x00100000
 [20:44:54.9]   0xE5920000
 [20:44:54.9]   0x405C2184
 [20:44:54.9]   0x405C2184
 [20:44:55.0]   0x405C2184
 [20:44:55.0]   0x00000000
 [20:44:55.0]   0x00000195
 [20:44:55.0]   0x60013C20
 [20:44:55.0]   0x00000001
 [20:44:55.0]   0x00000000
 [20:44:55.0]   0x405C218C
 [20:44:55.0]   0x00093400
 [20:44:55.0]   0x00093478
 [20:44:55.0]   0x00093400
 [20:44:55.0]   0x00093478
 [20:44:55.0]   0x60000000
 [20:44:55.0]   0x00088DEC
 [20:44:55.0]   0x0632EA00
 [20:44:55.1]   0x00000000
 [20:44:55.1]   0x04300001
 [20:44:55.1]   0x04300001
 [20:44:55.1]   0x32200221
 [20:44:55.1]   0x21111291
 [20:44:55.1]   0x00033F0F
 [20:44:55.1]   0x0000704B
 [20:44:55.1]   0x04300001
 [20:44:55.1]   0x04300000
 [20:44:55.1]   0xFFFFFFFF
 [20:44:55.1]   0x0000F103
 [20:44:55.1]   0x60000000
 [20:44:55.2]   0x00088DEC
 [20:44:55.2]   0x0632EA00
 [20:44:55.2]   0x00000001
 [20:44:55.2]   0x35840C01
 [20:44:55.2]   0x34040001
 [20:44:55.2]   0x11000091
 [20:44:55.2]   0x11001111
 [20:44:55.2]   0x00033F0F
 [20:44:55.2]   0x0000704B
 [20:44:55.2]   0x04300001
 [20:44:55.2]   0x04300000
 [20:44:55.2]   0xFFFFFFFF
 [20:44:55.2]   0x00001903
 [20:44:55.2]   0x40000000
 [20:44:55.3]   0x00084E60
 [20:44:55.3]   0x0632EA00
 [20:44:55.3]   0x00000000
 [20:44:55.3]   0x04300001
 [20:44:55.3]   0x04300001
 [20:44:55.3]   0x22200211
 [20:44:55.3]   0x22101211
 [20:44:55.3]   0x00000909
 [20:44:55.3]   0x04300001
 [20:44:55.3]   0x04300000
 [20:44:55.3]   0xFFFFFFFF
 [20:44:55.3]   0xFFFFFFFF
 [20:44:55.4]   0x00020909
 [20:44:55.4]   0x0000F917
 [20:44:55.4]   0x00000004
 [20:44:55.4]   0x40000000
 [20:44:55.4]   0x00084E60
 [20:44:55.4]   0x0632EA00
 [20:44:55.4]   0x00000001
 [20:44:55.4]   0x16040C01
 [20:44:55.4]   0x04302001
 [20:44:55.4]   0x21301191
 [20:44:55.4]   0x11001291
 [20:44:55.4]   0x000009C9
 [20:44:55.5]   0x04300001
 [20:44:55.5]   0x04300000
 [20:44:55.5]   0xFFFFFFFF
 [20:44:55.5]   0xFFFFFFFF
 [20:44:55.5]   0x00020909
 [20:44:55.5]   0x00005013
 [20:44:55.5]   0x00000004
 [20:44:55.5]   0xEA000049
 [20:44:55.5]   0xE3A00003
 [20:44:55.5]   0xE5C20005
 [20:44:55.5]   0xE5C30005
 [20:44:55.5]   0xE1A00006
 [20:44:55.5]   0xEBFFE638
 [20:44:55.5]   0xEA000043
 [20:44:55.6]   0xE5D20002
 [20:44:55.6]   0xE3100020
 [20:44:55.6]   0x0A000005
 [20:44:55.6]   0xE3A00009
 [20:44:55.6]   0xE5C20005
 [20:44:55.6]   0xE5C30005
 [20:44:55.6]   0xE1A00006
 [20:44:55.6]   0xEBFFE62F
 [20:44:55.6]   0xEA00003A
 [20:44:55.6]   0xE3A04016
 [20:44:55.6]   0xEA000038
 [20:44:55.6]   0xE3A04016
 [20:44:55.7]   0xEA000036
 [20:44:55.7]   0xE3A0400B
 [20:44:55.7]   0xEA000034
 [20:44:55.7]   0xE3550000
 [20:44:55.7]   0x0A000008
 [20:44:55.7]   0xE3550001
 [20:44:55.7]   0x0A000001
 [20:44:55.7]   0xE3550002
 [20:44:55.7]   0x1A00002D
 [20:44:55.7]   0xE5D20002
 [20:44:55.7]   0xE3100020
 [20:44:55.7]   0x1A000001
 [20:44:55.7]   0xE3A04016
 [20:44:55.7]   0xEA000029
 [20:44:55.8]   0xE351000B
 [20:44:55.8]   0x0A000007
 [20:44:55.8]   0xE3510003
 [20:44:55.8]   0x0A000005
 [20:44:55.8]   0xE351000A
 [20:44:55.8]   0x0A000003
 [20:44:55.8]   0xE3510009
 [20:44:55.8]   0x0A000001
 [20:44:55.8]   0xE3510005
 [20:44:55.8]   0x1A00001C
 [20:44:55.8]   0xE1A00006
 [20:44:55.8]   0xEBFFE60C
 [20:44:55.9]   0xE59F10A0
 [20:44:55.9]   0xE1D110BE
 [20:44:55.9]   0xE1500001
 [20:44:55.9]   0x2A000016
 [20:44:55.9]   0xE5D21005
 [20:44:55.9]   0xE3510005
 [20:44:55.9]   0x1A000001
 [20:44:55.9]   0xE3A0400D
 [20:44:55.9]   0xEA000014
 [20:44:55.9]   0xE3550000
 [20:44:55.9]   0x1A000001
 [20:44:55.9]   0xE3510003
 [20:44:56.0]   0x1A000007
 [20:44:56.0]   0xE3550001
 [20:44:56.0]   0x1A000001
 [20:44:56.0]   0xE3510009
 [20:44:56.0]   0x1A000003
 [20:44:56.0]   0xE3550002
 [20:44:56.0]   0x1A000004
 [20:44:56.0]   0xE351000A
 [20:44:56.0]   0x0A000002
 [20:44:56.0]   0xE3A0000B
 [20:44:56.0]   0xE5C20005
 [20:44:56.0]   0xE5C30005
 [20:44:56.1]   0xE1A00006
 [20:44:56.1]   0xEBFFE5F7
 [20:44:56.1]   0xEA000002
 [20:44:56.1]   0xE3A04004
 [20:44:56.1]   0xEA000000
 [20:44:56.1]   0xE3A04004
 [20:44:56.1]   0xE3570000
 [20:44:56.1]   0x0A000001
 [20:44:56.1]   0xE3A00001
 [20:44:56.1]   0xFBFFCC58
 [20:44:56.1]   0xE320F000
 [20:44:56.1]   0xE320F000
 [20:44:56.2]   0xE1A00004
 [20:44:56.2]   0xEAFFFF93
 [20:44:56.2]   0x00002851
 [20:44:56.2]   0x00002859
 [20:44:56.2]   0x0000286A
 [20:44:56.2]   0x0000286F
 [20:44:56.2]   0x6000089C
 [20:44:56.2]  Register:
 [20:44:56.2]  r0:  0xE5920004  r1:  0x60013C20  r2:  0x602FF288
 [20:44:56.2]  r3:  0x00100000  r4:  0xE5920000  r5:  0x405C2184
 [20:44:56.2]  r6:  0x405C2184  r7:  0x405C2184  r8:  0x00000000
 [20:44:56.2]  r9:  0x00000195  r10:  0x60013C20  r11:  0x00000001
 [20:44:56.3]  r12:  0x00000000  r13:  0xFFFE2300  r14:  0x06052402
 [20:44:56.3]  r15:  0x405C218C
 [20:44:56.3]  SPSR: 0xA0000053  DFAR:  0x00000000  DFSR: 0x00000406

How can I get some information from this? or can I know something from the register like R0 to R14? what exactly do these mean?

arm
stack-trace
trace
asked on Stack Overflow Jul 15, 2013 by How Chen • edited Jul 15, 2013 by How Chen

1 Answer

0

First of all you can see (first line) that the crash was caused by a "data abort". The possible causes of data aborts are:

  • alignment faults
  • translation faults
  • domain faults
  • permission faults.

You can read more about it on ARM's official manual.

After that you'll see the contents of the system stack (each line is a memory location).

And at the bottom you'll find the content of each register:

 [20:44:56.2]  Register:
 [20:44:56.2]  r0:  0xE5920004  r1:  0x60013C20  r2:  0x602FF288
 [20:44:56.2]  r3:  0x00100000  r4:  0xE5920000  r5:  0x405C2184
 [20:44:56.2]  r6:  0x405C2184  r7:  0x405C2184  r8:  0x00000000
 [20:44:56.2]  r9:  0x00000195  r10:  0x60013C20  r11:  0x00000001
 [20:44:56.3]  r12:  0x00000000  r13:  0xFFFE2300  r14:  0x06052402
 [20:44:56.3]  r15:  0x405C218C

Notice that the values are in hexadecimal (hence the 0x at the beginning of each).

You can also run the program with GDB to follow the content of each register after each instruction.

answered on Stack Overflow Jul 15, 2013 by Daniel Scocco

User contributions licensed under CC BY-SA 3.0