Here are the steps of how to get the backtrace log of a crashed program on meego handset
- Find the "core" logs files under /tmp.
- When a program crashed, there will be a "core" file (file name like "core.xxx") generated under /tmp automatically.
- The current MeeGo supports it by default, no additional package needed.
- Find which "core" log is for the crashed program.
- In /tmp, there could be more than one "core" file, choose the latest one.
- For example, if the crashed program is "meego-handset-people", and the latest "core" log is "core.1000", we can user command "file core.1000" to check whether the "core" log is generated for "meego-handset-people".
- If it isn't, we could try the next latest "core" log with file command until we find the correct one
- Use gdb to get the backtrace information of this crash.
- Gdb hasn't been installed on the latest MeeGo image, we have to install it before we can get the backtrace information
- Before start gdb, run comman "script" command to record the following screen output
- Let’s still use "meego-handset-people" and "core.1000" for an example. Run command "gdb /usr/bin/meego-handset-people core.1000".
- Firstly, gdb starts to reproduce the crashing process recorded in "core.1000". When it stops, we can input "bt" command in gdb console, and it starts to dump the backtrace of this crash.
- After all backtrace is shown, input "quit" to leave gdb.
- Input "exit" command to stop "script", and we get the screen output in "typescript" under the current folder
- Open "typescript", the content after "bt" command is the backtrace we need for this crash