Advanced Debugging
About AdvDbg Consult Train Services Products Tools Community Contact  
欢迎光临 高端调试 登录 | 注册 | FAQ
 
  ACPI调试
Linux内核调试
Windows内核调试
 
  调试战役
调试原理
新工具观察
 
  Linux
Windows Vista
Windows
 
  Linux驱动
WDF
WDM
 
  PCI Express
PCI/PCI-X
USB
无线通信协议
 
  64位CPU
ARM
IA-32
  CPU Info Center
 
  ACPI标准
系统认证
Desktop
服务器
 
  Embedded Linux
嵌入式开发工具
VxWorks
WinCE
嵌入式Windows
 
  格蠹调试套件(GDK)
  格蠹学院
  小朱书店
  老雷的微博
  《软件调试》
  《格蠹汇编》
  《软件调试(第二版)》
沪ICP备11027180号-1

C/C++本地代码调试

帖子发起人: woodhead   发起时间: 2013-04-03 11:39 上午   回复: 2

Print Search
帖子排序:    
   2013-04-03, 11:39 上午
woodhead 离线,最后访问时间: 2017/1/22 1:14:57 woodhead

发帖数前100位
注册: 2013-02-06
发 贴: 13
栈回溯被破坏了么?
Reply Quote

栈回溯被破坏了么?一个异常dump分析如下,向各位高手请教:如何跟踪?什么情况下会出现:WARNING: Frame IP not in any known module. Following frames may be wrong 符号应该都是对的

0:027> .ecxr
eax=09b83258 ebx=00f1b5e8 ecx=000003dc edx=00000000 esi=000003dc edi=09b8315c
eip=6e845536 esp=09b83068 ebp=09b8315c iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
proxysdk!pthread_mutex_lock+0x6:
6e845536 8b06            mov     eax,dword ptr [esi]  ds:0023:000003dc=????????
0:027> kbn
  *** Stack trace for last set context - .thread/.cxr resets it
 # ChildEBP RetAddr  Args to Child             
00 09b8306c 6e8309d6 000003dc 09b83274 09b8438c proxysdk!pthread_mutex_lock+0x6
01 09b8438c 09b84d78 00f1b5e8 cccccccc cccccccc proxysdk!CLS_SingleLock::CLS_SingleLock+0x56 [f:\windows sdk\sdk_v4.0\trunk\commoncode\util\cls_singlelock.cpp @ 12]
WARNING: Frame IP not in any known module. Following frames may be wrong.
02 09b84d64 6ca217ce 1df9aa78 0000002d 02638fb8 0x9b84d78
03 09b85140 6c9f0c19 6c8f89d8 02638fb8 00000000 NVSSDK!CLS_CmdChan::Inner_ProxySend_ITS_TimeRangeParam+0x87e [f:\windows sdk\sdk_v4.0\trunk\nvssdk\serverctrl\cmdgetpara.cpp @ 3748]
04 09b8cc70 6c9c9ea0 6c8f89d8 02638fb8 00000000 NVSSDK!CLS_CmdChan::GetChanPara+0x246e9 [f:\windows sdk\sdk_v4.0\trunk\nvssdk\serverctrl\cmdgetpara.cpp @ 2335]
05 09b8cd5c 6c992efd 00000001 00000000 6e814819 NVSSDK!CLS_CmdChan::GetCmdString+0x70 [f:\windows sdk\sdk_v4.0\trunk\nvssdk\serverctrl\cmdgetpara.cpp @ 54]
06 09b8ce58 6c9abf69 00000001 00000000 6e814819 NVSSDK!CLS_Server::GetCmdString+0x3d [f:\windows sdk\sdk_v4.0\trunk\nvssdk\serverctrl\cls_server.cpp @ 299]
07 09b8cf60 6ca3772e 00000002 00000001 00000000 NVSSDK!CLS_ServerList::GetCmdString+0x59 [f:\windows sdk\sdk_v4.0\trunk\nvssdk\serverctrl\cls_serverlist.cpp @ 373]
08 09b8d054 6e835ad1 00000002 00000001 00000000 NVSSDK!NetClient_GetCmdString+0x3e [f:\windows sdk\sdk_v4.0\trunk\nvssdk\interface\netsdkclient.cpp @ 680]
09 09b8d148 6e81e480 00000001 00000000 6e814819 proxysdk!CLS_TDDev::GetCmdString+0x41 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\virtualdev\cls_tddev.cpp @ 168]
0a 09b8d364 6e81e73a 09b8edd8 09b8fd74 00f1b5e8 proxysdk!CLS_ConNode::SendEncoderInfo+0x3b0 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 725]
0b 09b8d4b0 6e81ef5f 09b8d5c0 e9682826 09b8f72c proxysdk!CLS_ConNode::ProcessOneProtocol+0xda [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 747]
0c 09b8ede4 6e81cdf9 0bb61d9e 00000034 09b8f870 proxysdk!CLS_ConNode::ProcessClientCmd+0xbf [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 923]
0d 09b8f72c 6e81c5ea 0bb61d8c 00000046 09b8f95c proxysdk!CLS_ConNode::AnalyzeCmd+0x139 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 413]
0e 09b8f870 6e81c3d4 09b8fa68 09b8fd74 00f1b5e8 proxysdk!CLS_ConNode::ParseStreamData+0x1ba [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 266]
0f 09b8f95c 6e820ea9 11d11a30 0000005a 09b8fb84 proxysdk!CLS_ConNode::DataArraive+0xe4 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 216]
10 09b8fa68 6e8175d4 09b8fc94 09b8fd74 00f1b5e8 proxysdk!CLS_ConNode::ProcessEvents+0xc9 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectnode.cpp @ 1427]
11 09b8fb84 6e8174d0 09b8fd68 09b8fd74 00f1b5e8 proxysdk!CLS_ConList::DealNodeList+0x84 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectlist.cpp @ 91]
12 09b8fc94 6e81826a 09b8fe68 09b8fd74 00f1b5e8 proxysdk!CLS_ConList::TimeToProcessData+0x70 [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectlist.cpp @ 65]
13 09b8fd68 6e836a14 081ce908 00000000 086df318 proxysdk!ThreadPollFun+0x2a [f:\windows sdk\sdk_v4.0\trunk\proxysdk\connectlist\cls_connectlist.cpp @ 20]
14 09b8fe68 6e847531 081ce908 00000000 086df2d8 proxysdk!CLS_ThreadPool::ThreadWorker+0xa4 [f:\windows sdk\sdk_v4.0\trunk\commoncode\common\cls_threadpool.cpp @ 137]
15 09b8fe94 6e8543f3 0868e920 e9683b12 00000000 proxysdk!ptw32_threadStart+0x61
16 09b8fed0 6e854364 00f1b830 09b8fee8 75b6d0e9 proxysdk!_callthreadstartex+0x53 [f:\dd\vctools\crt_bld\self_x86\crt\src\threadex.c @ 348]
17 09b8fedc 75b6d0e9 00f1b830 09b8ff28 771919bb proxysdk!_threadstartex+0xa4 [f:\dd\vctools\crt_bld\self_x86\crt\src\threadex.c @ 331]
18 09b8fee8 771919bb 00f1b5e8 2d3d9612 00000000 kernel32!BaseThreadInitThunk+0xe
19 09b8ff28 7719198e 6e8542c0 00f1b5e8 ffffffff ntdll!__RtlUserThreadStart+0x23
1a 09b8ff40 00000000 6e8542c0 00f1b5e8 00000000 ntdll!_RtlUserThreadStart+0x1b
0:027> ub 6e845536
proxysdk!pthread_self+0xcb:
6e84552b cc              int     3
6e84552c cc              int     3
6e84552d cc              int     3
6e84552e cc              int     3
6e84552f cc              int     3
proxysdk!pthread_mutex_lock:
6e845530 51              push    ecx
6e845531 56              push    esi
6e845532 8b74240c        mov     esi,dword ptr [esp+0Ch]
0:027> r
Last set context:
eax=09b83258 ebx=00f1b5e8 ecx=000003dc edx=00000000 esi=000003dc edi=09b8315c
eip=6e845536 esp=09b83068 ebp=09b8315c iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202
proxysdk!pthread_mutex_lock+0x6:
6e845536 8b06            mov     eax,dword ptr [esi]  ds:0023:000003dc=????????

 


IP 地址: 已记录   报告
   2013-04-03, 14:42 下午
Raymond 离线,最后访问时间: 2020/7/3 3:40:25 格蠹老雷

发帖数前10位
注册: 2005-12-19
发 贴: 1,303
Re: 栈回溯被破坏了么?
Reply Quote

看起来栈溢出了

 


IP 地址: 已记录   报告
   2013-06-20, 20:08 下午
AndrewChen 离线,最后访问时间: 2013/6/14 14:59:19 AndrewChen

无等级
注册: 2013-06-14
发 贴: 1
Smile [:)] Re: 栈回溯被破坏了么?
Reply Quote
经常遇到这种问题,release下的优化代码,windbg回溯栈的确会导致这种问题,我一般是这么解决
先获取下当前线程的栈范围,栈底可以通过!teb里的字段获取
然后把栈上空间关联的符号用dds打印出来
如果你有源码的情况下,并且函数调用都是call,而不是过多的jmp,通过自底向上的手工回溯,确定出调用顺序。
这种方法比较体力活,特别是栈深的情况下。希望有好方法的兄弟不吝赐教


IP 地址: 已记录   报告
高端调试 » 软件调试 » C/C++本地代码调试 » Re: 栈回溯被破坏了么?

 
Legal Notice Privacy Statement Corporate Governance Corporate Governance
(C)2004-2020 ADVDBG.ORG All Rights Reserved.