|
Sometimes, when the stack is corrupted, or if
suapiscripts/workbench is confused, the subt
command may show only a 1 level callstack.
An example is
below: ---------------------------------------------------------------------- ... sp:
0x08448424 pc: 0x10db7b92
logger_vpanic+0048 sp: 0x0844847c pc:
0x1028983e
suJTPalPanic+002e ====================================================================== Unrecoverable
Exception Frame:
(sp:0x084484a4)
epc: 0x10941fc0
(free+005c)
epsr:
0x800f0010
vecnum: 15 (Reserved
(15))
r0-r3: 0x084484f4 0xfff00028
0xfff00000
0x11700000
r4-r7: 0x00000000 0x10a347ec
0x000000c8
0x12000000
r8-r11: 0x00000000 0x0846e9b0 0x08cf7920
0x0802f860 r12-r15:
0xfff00018 0x21ea1ec4 0x10a347dc
0x10289792 ====================================================================== sp:
0x084484f4 pc: 0x10941fc0 free+005c sp:
0x084484fc pc: 0x08236e24
vmc_partition_part_8_glb+23e4 sp: 0x084484fc
pc: 0xffffffff
ffffffff ----------------------------------------------------------------------
First, check whether some other tool such
as panic_info is able to properly decode the
call stack. panic_info can be accessed from
workbench by opening the bin file, clicking the
"Panic Analysis" button, and selecting
"panic_info(Mikhail Durnev)". If not, do the
following: In the callstack, locate
the first line below the exception.
For the callstack shown above, it
is sp:
0x084484f4 pc: 0x10941fc0 free+005c
Note the value of the stack
pointer(sp) in this
line.
i.e. 0x084484f4
Use the dsym command with this sp
value(0x084484f4) as
below
dsym 0x084484f4 256
The above command will show an output
like that below. I have removed some lines for
readability ------------------------------------------------------------------------ 0x084484f4:
mme_resm_gen_heap_memory+90bc 0x084484f8:
vmc_partition_part_8_glb+23e4 0x084484fc:
mme_resm_gen_heap_memory+917c 0x08448500:
MME_FW_dlmalloc_free+0040 0x08448504:
0x191a1418 ... 0x08448524:
MAKE_NUM_DAV_BLOCKS 0x08448528:
MME_FW_dlmalloc_free+0040 0x0844852c:
mme_resm_gen_heap_memory+8a14 0x08448530:
mme_resm_gen_heap_memory+8aac 0x08448534:
MAKE_NUM_BOOT_BLOCKS+004c 0x08448538:
mme_resm_gen_heap_memory+8a14 0x0844853c:
bmp_free+000c 0x08448540:
MAKE_NUM_DAV_BLOCKS 0x08448544:
mme_resm_gen_heap_memory+8b74 0x08448548:
DANALI_16 0x0844854c:
bmp_destroy+0038 0x08448550:
RAMROM_flash_fota_size+1401 0x08448554:
vmc_partition_part_11_glb+3244 0x08448558:
vmc_partition_part_11_glb+3324 ..... 0x084485f0:
MAKE_NUM_DAV_BLOCKS ------------------------------------------------------------------------
In the output of the above command, locate the
lines which are of the form function_name+number
( do not include lines of the form
variable_name+number )
In the example above, the interesting
lines are 0x08448500:
MME_FW_dlmalloc_free+0040 0x0844853c:
bmp_free+000c 0x0844854c:
bmp_destroy+0038
Starting with the first interesting
line, run the following 4 commands, after
replacing 0x08448500 below with the
corresponding number in the first column of the
interesting line. set dummy
0x08448500 wr sp [ hexpr $dummy
+ 4 ] wr pc [ peekw $dummy
] subt Now check
if the displayed callstack looks OK ( i.e. a
callstack of several levels is displayed)
. If not, repeat the last 4
commands with the next interesting line, till
you get an OK call stack.
If you get a proper callstack, keep in
mind that the first few call frames will not be
present in that list, because that portion of
the stack has been corrupted and cannot possibly
be decoded.
Note: In some cases (on a sirius
phone), I have seen that instead of "wr sp [
hexpr $dummy + 4 ]" above, the callstack was
shown properly only if I used "wr sp [ hexpr
$dummy + 8 ]"
In the example above, the partial
callstack I got was
----------------------------------------------------------------------- sp:
0x0844852c pc: 0x109428d6
MME_FW_dlmalloc_free+0040 sp: 0x08448544 pc:
0x10938d38 bmp_free+000a sp: 0x08448554 pc:
0x10938de0 bmp_destroy+0036 sp: 0x0844856c
pc: 0x10939a0e bmp_destroy_decoder+001a sp:
0x08448574 pc: 0x10938c82
MME_IMG_bmp_close+001c sp: 0x08448584 pc:
0x10960afa MME_IMG_interface_close+000c sp:
0x0844858c pc: 0x1097af3e
mme_sidf_delete+00ba sp: 0x084485ac pc:
0x109436d8
mme_fw_filter_handle_message_handler+012c sp:
0x084485bc pc: 0x1095e900
MME_GEN_TaskInit+004c sp: 0x084485dc pc:
0x10040486
vmc_userexit -----------------------------------------------------------------------
|