It crashed. Now what?
When you run your program, the following message is displayed:
Trap occurred
Vector = Access Error FMT
= xx SR = xxxx FS = xx
Fault PC = 12345678
D0...
Now what do you do?
PC = xxxxxxxx shows where the program was when the crash occurred.
Given this information you can usually find the program line number.
This is done with the utility m68k-elf-addr2line.
Suppose I am building a project I named MyProject.
The makefile will create the following files:
- MyProject.elf in the project directory
- MyProject.map in the project directory
- MyProject.s19 in the ../nburn/bin directory
- MyProject_APP.s19 in the ../nburn/bin directory.
The command to find the line number of an error is:
m68k-elf-addr2line -e MyProject.elf <Fault PC>
For example,
m68k-elf-addr2line -e MyProject.elf 0x12345678
|