I've got an on device crash that I'm debugging, and I want to make sure I'm using symbols.db
correctly.
Firstly, this is my crashlog.txt:
build:bcbf4fed-2.6.0-release.176236-buildbot
r0:00000000 r1:90fab954 r2:00006140 r3: 00000000
r12:240dbc86 lr:24098279 pc:24052ab8 psr: 210f0200
cfsr:00000082 hfsr:00000000 mmfar:00000000 bfar: 00000000
rcccsr:00000000
heap allocated: 16481440
Lua totalbytes=0 GCdebt=0 GCestimate=0 stacksize=0
As I understand it:
pc
is the address of the function that was executing when the crash occurredlr
is the return pointer from that address. I can think of it as the second function in the stack trace
Both 0x24052ab8
are 0x24098279
functions within the SDK.
For each of those, am I correct in the formation of the following queries?
> sqlite3 /usr/local/playdate/bin/symbols.db ".headers on" ".mode column" \
"SELECT * FROM functions WHERE 0x24052ab8 BETWEEN low AND low + size;"
name low size hw_id
------ --------- ---- -----
hidden 604318372 422 1
> sqlite3 /usr/local/playdate/bin/symbols.db ".headers on" ".mode column" \
"SELECT * FROM functions WHERE 0x24098279 BETWEEN low AND low + size;"
name low size hw_id
----------------- --------- ---- -----
LCDBitmap_addMask 604602804 252 1
> sqlite3 /usr/local/playdate/bin/symbols.db ".headers on" ".mode column" \
"SELECT * FROM lines INNER JOIN files ON file_id WHERE lines.low < 0x24052ab8 ORDER BY lines.low DESC LIMIT 1;"
id low file_id lineno hw_id id path
------ --------- ------- ------ ----- -- ----
200542 604318390 142 0 1 1 OS
> sqlite3 /usr/local/playdate/bin/symbols.db ".headers on" ".mode column" \
"SELECT * FROM lines INNER JOIN files ON file_id WHERE lines.low < 0x24098279 ORDER BY lines.low DESC LIMIT 1;"
id low file_id lineno hw_id id path
------ --------- ------- ------ ----- -- ----
349249 604603000 241 271 1 1 OS
Does that all look right?
And while I'm here, Is there any other userful information I can gather from the crashlog?