Motorola - My Motorola - Compass - Directory 
   
 
 

FAQ Console
get email notified of new entries Subscribe to this FAQ
print view print view
Filter this FAQ
Recent FAQ Entries
MultimediaWorkbench: FAQ for MultimediaWorkbench Functions
FAQ for MultimediaWorkbench
Frequently asked questions about Multimedia Workbench
Table of Contents
Entries
 
Q:
Matching ethereal pcap timestamps with parsed datalog text file timestamps [see details]
A:

If you use ethereal to look at PCAP/pppdump files generated by multimedia workbench, then
in the Ethereal "View" Menu, click "Time Display Format" and select "Time of Day".
Note: If you use an old version of ethereal, these options are located somewhere else in the menu.

Now you should be able to match the timestamps shown by ethereal with that shown in the parsed text log created by workbench

 
Q:
Finding a parsed text datalog message based on time [see details]
A:

When viewing a text log in workbench, you can search for a datalog message with a specified time.
In the Edit Menu, Select "Jump To Message Time"

This is useful for example if you are trying to find the text datalog message corresponding to an IP packet timestamp shown by ethereal.
Or, if you are looking at some message flows generated by workbench, sometimes the flow diagram will have only the timestamp, and this will help locate the datalog message corresponding to that timestamp

 
Q:
Filtering Binary Datalogs [see details]
A:

Converting huge bin files to text format can take a long time to complete.
Morever, since the text files generated will also be huge, filtering or post processing the huge text files will also be time consuming.

When you open a bin file in workbench, BEFORE converting it to text, you can click on "Create Filtered BinFile" to remove datalogs that you are not interested in.
For example, if you are interested only in MME related logs, select MME and click OK, so that a new binfile with only MME datalog messages get created.
This new binfile is likely to be much smaller than the original binfile, if the original binfile had dfsp,engine,etc ports enabled.
Parsing this smaller binfile, and filtering the parsed text log is likely to be faster than doing those with the original binfile.
I use "UMTS Dual Mode" option to create a filtered binfile that I can open (faster) in RTA to see WCDMA NAS/RRC messages.
If you have a custom range of messages to filter, select the Custom option in the "Create Filtered Binfile" dialog, and specify a range like 100-200,9000-10000 or whatever.

 
Q:
Using SPY with SuapiScripts [see details]
A:

SPY is a framework for detecting memory leak/corruption issues on P2K phones
See the archives of the SPYTOOL mailing list at http://maillist.mot.com/

There are 2 SPY related commands available in workbench SuapiScripts.
spy_find <ADDRESS>
  This command searches the global table maintained by SPY and prints the
    callstack at which ADDRESS was last "allocated OR freed"
  e.g. spy_find 0x12345678

spy_all_dump
  This command dumps the complete global table maintained by SPY.
   i.e. For each of the pointers about which SPY currently stores information,
         it prints the callstack at which this memory was last "allocated OR freed"
   e.g. spy_all_dump

Important Note:
  These commands assume that the SPY_CALL_DEEP(3) and SPY_TAB_SIZE(4096)
   defined in /vobs/synergy_core_apps/code/calculator/src/spy_sumem.c have
   not been modified. If you modify these defines, then you need to pass
   those arguments also to spy_find/spy_all_dump
    i.e  spy_find <ADDRESS> [stack_depth] [table_size]
     and spy_all_dump [stack_depth] [table_size]

    e.g. spy_find 0x12345678 5
         spy_find 0x12345678 3 8192
         spy_all_dump 6
         spy_all_dump 7 2048

 
Q:
SuapiScripts - Finding the (partial) callstack when the stack is corrupted [see details]
A:

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
-----------------------------------------------------------------------

 

 
Q:
Panic Analysis - A DOS window appears and immediately disappears [see details]
A:

Sometimes, you may see that when you select one of the options displayed after clicking the Panic Analysis button, a DOS window may appear and immediately disappear.

This probably happened because some other program or another instance of workbench/suapiscripts had opened the bin/elf file in exclusive read/write mode.

Try closing all other instances of suapiscripts, look at the process list to verify that no visible/hidden application has opened the binfile, or logoff and login and then try doing the panic analysis again.