debug navicimom with windbg

本文介绍如何使用Windbg进行调试,包括设置断点、查看堆栈、追踪内存地址等高级技巧,以及如何通过异常追踪来定位和解决程序错误。

1. Disable watchdog on sp: set WatchdogActive to 0in HKLM/SOFTWARE/EMC/ManagementServer/Navishpere Express/WatchDog

2. kiss whatchdog in task manager.

3.use a script to point your clearcase view to the correct symbols????

 

========windbg command=====================

ctrl + break: to break into debugger

~*kbn displays stacks of all threads

~#n switch ocntext to given # thread

.frame # enter  frame # in current thread

dv /i /t : display local variables of

bu `CIMOM.CPP:484`

bu NaviCimom!CIMOM::handleRequtest

bl(list) bd(disable) be(enable) bc(clear)

dt NAVString(shows how a class is laid out in memory)

dt NAVString 0x014bd054 (cast that address in given type)

dd (displays memory in 32 bit) dc(pls dd, also displays the bytes in ascii format) da (just displays memory as ascii f)

.logopen <FileName>

.logappend <FileName>

.logclose

 

windbg is great with tracing

void NAVLog::log(const NAVString & who, const NAVString& what, etc.) // ingnor other parameters

bu Log!NAVLog::log ".printf /"CIMOMLog: %ma - %ms //n /", poi(poi(esp+0x4 ), poi(poi(esp+0x8 )); g; "

poi(poi( : dereference a reference. if not for reference, poi(esp+0x4) means the first variable

%ma print NULL terminated ascii strings

 

+0x4 the first parameter passed in when no return value

+0x8 the first parameter passed in when ther eis return value for this function.

-0x28, local variable

 

 

tracing exception

sxe(enable) -c "~kbn(print a stack trace); gn(continue with exception not handled);" eh(event code for a c++ exception, av/dz);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值