Chinaunix首页 | 论坛 | 博客
  • 博客访问: 327912
  • 博文数量: 88
  • 博客积分: 2051
  • 博客等级: 大尉
  • 技术积分: 950
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-14 23:59
文章分类

全部博文(88)

文章存档

2012年(3)

2011年(2)

2010年(9)

2009年(14)

2008年(60)

我的朋友

分类: C/C++

2008-11-12 00:05:19

To get a useful call stack two things are always needed:
A hex dump of the memory used by the stack of the thread which paniced
A ROM symbol file for the software flashed onto the device.
 
With this information a Symbian perl script can decode a human readable call stack  ( similar to the call stack seen in the emulator).
 
symbian早期应该有个叫做d_exc的工具程序,在运行程序之前运行d_exc 。在程序panic的时候,它会把call stack记录到一个二进制.stk文件中!另外一个.txt文件记录panic的分类和panic code!
配合stk和symbol file,通过perl脚本就可以找出call stack function!
 
perl printstk.pl d_exc_NN stack.txt
 
其中d_exc_NN是dump的stack二进制文件名, my.symbol是程序的符号列表!现在这个东西C:\Symbian\9.2\S60_3rd_FP1\Epoc32\release\gcce\urel\HelloWorldBasic.exe.map应该就是符号列表!
 
在stack.txt里面可以找到一些panic附近的函数,关注那些出错的函数(打上log)可以快速的定位!
 
arm重要的register
R0 - The "this" pointer in c++ and the integer return from function
R1-3 - The arguments to the function
R13(sp) - current stakc position
R14(LR) - return address of function entry
R15(PC) - program counter
 
关于d_exc的资料:
Symbian OS supplies some utilities for on-device debugging. On the User Side, D_EXC is an
application coming along with Symbian OS release and it could catch user panic and
collect the loaded data at the moment the panic happens. On the Kernel Side, crash logger
could dump the loaded data when kernel panic happens, and crash reader would read the dumped data at the next time phone reboots. The implementation of the crash logger is
hardware dependant. Developers would be able to analyze the collected panic data to fix
the bug and improve the performance of software.

在这里有人说http://developer.symbian.com/forum/thread.jspa?threadID=24262 E61上有这个软件!可是我还没找到窍门
 
 
在EKA2版的手机中,由于d_exc是以driver级别的方式工作,需要TCB的能力!
The machine will reset if there is any panic in a system critical thread. One of the best ways to detect this is to use d_exc.exe.
这个thread讨论了N95的工作方式!
In EKA2 d_exc.exe has a device driver component so you can't install this without TCB capability. Its just possible however that this is present already in ROM - to test you need to launch the above named process (using RProcess etc). D_EXC.exe is present on the E61 (discovered by accident) so may be on N95.
 
这里http://objectmix.com/symbian/407808-crashs-while-running-device-driver.html对于d_exc也有很有用的说法,对kern—exec 3或许看看register更直接了当!
 
Any crashes in a Device Driver will result in a Kernel Panic, as the DD run=
s kernel side, and will display the crash debugger screen asking for a pass=
word.

For this screen you can dump the system value, registers etc.

Also you can install the d_exc application on your target and start it befo=
re running your test.
d_exc will create 2 files for each panic:

d_exc_nnn.txt
d_exc_nnn.stk


Copy both these files to the PC then open the crash log (d_exc_nnn.txt) in =
code explorer.

Provide the symbol files to run the included rofssym tool to decode the cra=
sh log (the decoded log is then opened automatically)

If you scanned the source code (menu item: code explorer - scan source) the=
n you will be able to jump directly from a line of the call stack to the so=
urce code of the corresponding function.



Note that for a KERN-EXEC 3 panic, the most interesting information is in t=
he registers rather than the stack

Mark
Symbian

这个log实在是太长了!因为我还没成功的使用过d_exc不得不记录的详细一些!

很不幸,根据http://discussion.forum.nokia.com/forum/showthread.php?p=422861&highlight=d_exc#post422861 我在E61上运行d_exc.exe真的不行!
 
Anyone know of a list of devices that D_EXC works on?

So far I have that it works on E51, E70 and E62.

But it does *not* work for N90, N92, E61 or E61i
 
网上有人说6120c成功运行起来了!
我的6122c也通过RProcess的方式成功运行起了d_exc.exe进程!cong!
在c盘看到d_exc_3903.stk  d_exc_3903.txt文件了!
 
阅读(1957) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~