.Net程序调试http://advdbg.org/forums/29/ShowForum.aspxzh-CNCommunityServer 1.1 (Build: 2.0.2.21480)前端应用程序关闭,但后台进程没关掉。http://advdbg.org/forums/6756/ShowPost.aspxThu, 29 Oct 2015 08:09:03 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:6756fresh0求定位思路,请各位大神指点。用windbg工具不知道要查看哪些命令,水平有限,见笑!求Code UI test 调试的方法(远端调试),通过vs 的Remote Debuggerhttp://advdbg.org/forums/5934/ShowPost.aspxFri, 16 Aug 2013 08:25:47 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:5934canterer4<P>因为测试机器不让安装vs,但是需要跑通过vs写的Code UI的自动化代码,因此只能通过vs 的Remote 进行调试,但是设置完成后,端点老是挂载不上,缺少pdb等文件,不能进行匹配,求有过这方面经验的同事给出指点,谢谢</P> <P><FONT>代码的格式</FONT></P> <P><FONT></FONT>&nbsp;</P> <P><FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [TestInitialize()]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Initialize()&nbsp;&nbsp;&nbsp; </FONT></P> <P><FONT>{</FONT></P> <P>&nbsp;&nbsp;&nbsp;<FONT>...</FONT></P> <P><FONT>}</FONT></P> <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [TestCleanup()]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Cleanup()</P> <P>{</P> <P>...</P> <P>}</P> <P>&nbsp;</P> <P>[TestMethod]</P> <P>public void test()</P> <P>{</P> <P>...</P> <P>}</P> <P>调试test这个方法。端点打不上,attach的process是 QTAgent32.exe *32</P> <P>谢谢</P>.net程序调用第三方库的多线程异常问题http://advdbg.org/forums/5516/ShowPost.aspxThu, 27 Dec 2012 05:54:12 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:5516英宁2张老师您好。<div>公司开发的工具使用了C#,有通过C++ interop调用C++的dll,该dll生成了其它线程,在这个线程上发生了异常。</div><div>工具本身的CLR的异常是有用UnhandledException和ThreadException来进行处理,生成了dump的;而这个C++DLL其它线程的异常没办法捕获,SetUnhandledExceptionFilter也没办法处理到。请问是否这种情况下依靠程序自身就无法生成dmp了?</div>请教heap corruption的问题。http://advdbg.org/forums/3975/ShowPost.aspxSat, 12 Jun 2010 03:03:49 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:3975xavier4<P>C#的windows app程序,不定时的crash.</P> <P>打开pageheap /full 后用adplus生成full dump。</P> <P>用!analyze -v 分析结果如下,好像应该是heap corruption.</P> <P><EM>MODULE_NAME: heap_corruption</EM></P> <P><EM>IMAGE_NAME:&nbsp; heap_corruption</EM></P> <P><EM>DEBUG_FLR_IMAGE_TIMESTAMP:&nbsp; 0</EM></P> <P><EM>STACK_COMMAND:&nbsp; ~11s; .ecxr ; kb</EM></P> <P><EM>FAILURE_BUCKET_ID:&nbsp; heap_corruption!heap_corruption_80000003_HEAP_CORRUPTION</EM></P> <P><EM>BUCKET_ID:&nbsp; APPLICATION_FAULT_HEAP_CORRUPTION_STATUS_BREAKPOINT_heap_corruption!heap_corruption</EM></P> <P>但是很奇怪的是,载入sos后用!clrstack看不到调用堆栈,报了如下信息:</P> <P><EM>OS Thread Id: 0xf4 (11)<BR>Failed to start stack walk: 80004005</EM></P> <P>也就是说改线程上并没有运行.net的code。用kb看了一下call stack,</P> <P><EM>ChildEBP RetAddr&nbsp; Args to Child&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>0cc2f9f8 7c994a15 00000008 18649000 00000000 ntdll!DbgBreakPoint<BR>0cc2fa10 7c9a9354 00000008 7c9a9594 01151000 ntdll!RtlApplicationVerifierStop+0x160<BR>0cc2fa8c 7c9aa517 01151000 00000004 18649000 ntdll!RtlpDphReportCorruptedBlock+0x92<BR>0cc2fab0 7c9aa71a 01151000 01000002 00000020 ntdll!RtlpDphNormalHeapFree+0x2e<BR>0cc2fb00 7c9ad7bb 01150000 01000002 18649000 ntdll!RtlpDebugPageHeapFree+0x79<BR>0cc2fb74 7c989e1c 01150000 01000002 18649000 ntdll!RtlDebugFreeHeap+0x2c<BR>0cc2fc5c 7c967553 01150000 01000002 18649000 ntdll!RtlFreeHeapSlowly+0x37<BR><FONT color=#ffa500>0cc2fd2c 7698d01c 01150000 00000000 18649000 ntdll!RtlFreeHeap+0xf9</FONT><BR>0cc2fd40 770d5491 76a96034 18649000 76a96034 ole32!CRetailMalloc_Free+0x1c<BR>0cc2fd60 770d5427 00000000 76a9680c 770d5481 oleaut32!APP_DATA::FlushMemCache+0x28<BR>0cc2fd6c 770d5481 76992b5c 77151078 00000000 oleaut32!ReleaseAppData+0x56<BR>0cc2fd70 76992b5c 77151078 00000000 7c8097d0 oleaut32!CReleaseAppData::Release+0x5<BR>0cc2fd88 770d16af 00000000 00000000 00000003 ole32!CoSetState+0x80<BR>0cc2fec4 770d15a8 770d0000 00000003 00000000 oleaut32!DllMain+0x76<BR>0cc2fee4 7c94118a 770d0000 00000003 00000000 oleaut32!_DllMainCRTStartup+0x52<BR>0cc2ff04 7c953a23 770d1560 770d0000 00000003 ntdll!LdrpCallInitRoutine+0x14<BR>0cc2ff7c 7c80c126 7c800000 7c940000 0ab5b000 ntdll!LdrShutdownThread+0xd7<BR>0cc2ffb4 7c80b718 00000000 7c800000 7c940000 kernel32!ExitThread+0x3e<BR>0cc2ffec 00000000 77e36c7d 0ab5b000 00000000 kernel32!BaseThreadStart+0x3c</EM></P> <P>请教高手,出问题的线程(<EM>Thread Id: 0xf4 (11))</EM>并不是我的程序生成的,难道是.net生成的GC管理线程?</P> <P>如果是.net生成的线程的,为什么会发生heapcorruption异常呢?<BR></P>The longest driver from TaylorMade (TaylorMade Burner driver) http://advdbg.org/forums/4927/ShowPost.aspxThu, 16 Jun 2011 06:25:33 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:4927dandelion0TaylorMade Burner driver is desiged for all the players, it can improve all golfers' game. the TaylorMade Burner name has been around for a while and has had always been attached to some of the best golf clubs.<a href="http://www.golfnewland.com" target="_blank" title="http://www.golfnewland.com">discount golf equipment</a> The current TaylorMade Burner driver is no exception.it is lighter and longer than most sticks. Burner driver has two good technnology .<br><br>The TaylorMade Burner driver is geared towards the average golfer, so TaylorMade golf designed it with the SuperFast technology. This technology promotes faster swing speed and greater distance. This is done by using lighter, longer golf graphite shafts, light weight grips, large club face,<a href="http://www.golfnewland.com" target="_blank" title="http://www.golfnewland.com">golf clubs for sale</a> and higher launch angles combined with low spin rates. then TaylorMade Burner driver features the Dual Crown Technology. This technology allows the Burner driver to have a smaller crown while sitting on top of a larger base. This subsequently moves the center of gravity towards the back of the driver. The end result of that is longer carry and greater overall distance.<br><br>wholesale golf equipment:<br><a href="http://www.golfnewland.com/Callaway-Diablo-Octane-Fairway-Wood-%28Preorder%29-16122.html" target="_blank" title="http://www.golfnewland.com/Callaway-Diablo-Octane-Fairway-Wood-%28Preorder%29-16122.html">Callaway Diablo Octane Fairway Wood</a><br><a href="http://www.golfnewland.com/TaylorMade-R9-Fairway-Wood-1026.html" target="_blank" title="http://www.golfnewland.com/TaylorMade-R9-Fairway-Wood-1026.html">TaylorMade R9 Fairway Wood</a><br><a href="http://www.golfnewland.com/TaylorMade-Burner-SuperFast-20-Fairway-Wood-16477.html" target="_blank" title="http://www.golfnewland.com/TaylorMade-Burner-SuperFast-20-Fairway-Wood-16477.html">TaylorMade Burner SuperFast 2.0 Fairway Wood</a>请教一个.Net程序中PInvoke的问题http://advdbg.org/forums/1607/ShowPost.aspxWed, 17 Dec 2008 05:26:54 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:1607手语7<P>今天帮同事调试一个.Net程序,结果发现一个很奇怪的问题:</P> <P>同事的.Net程序通过PInvoke调用一个native exe模块(A.exe)中的函数B()。(类似于调用Dll中的函数,我不懂.Net,不知道这么描述对吗)</P> <P>运行的时候发生AV。</P> <P>跟踪发现B()又调用了另一个native dll模块(C.dll)中的输出函数D()。</P> <P>AV发生的过程是B()通过IAT调用D(),但是IAT中D()的地址明显有问题。</P> <P>通过观察IAT中附近的其他地址,我感觉这个A.exe的IAT在被load到.Net进程的地址空间的时候没有被重定位。</P> <P>所以A.exe的IAT中的地址都是有问题的。</P> <P>现在的问题是,这种情况有可能发生吗?是Loader的问题还是正常情况?</P> <P>有什么好地解决办法?</P> <P>往各路大侠指点。多谢。</P>Silverlight 崩溃问题http://advdbg.org/forums/3446/ShowPost.aspxFri, 15 Jan 2010 04:32:14 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:3446losesoul2我的一个Silverlight程序,偶尔出现崩溃问题,用windbg得到了它的Crashed Dump,发现是agcore内部异常了,请问如何进一步获取这个SetValue方法下的参数信息,最好能在sos下看到这个对象的具体信息<br>FAULTING_IP: <br>+5ba952f051ddf74<br>9122086c ??&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ???<br><br>EXCEPTION_RECORD:&nbsp; 0b11f888 -- (.exr 0xb11f888)<br>ExceptionAddress: 9122086c<br>&nbsp;&nbsp; ExceptionCode: c0000005 (Access violation)<br>&nbsp; ExceptionFlags: 00000000<br>NumberParameters: 2<br>&nbsp;&nbsp; Parameter[0]: 00000000<br>&nbsp;&nbsp; Parameter[1]: 9122086c<br>Attempt to read from address 9122086c<br><br>FAULTING_THREAD:&nbsp; 00001470<br><br>DEFAULT_BUCKET_ID:&nbsp; INVALID_POINTER_READ<br><br>PROCESS_NAME:&nbsp; iexplore.exe<br><br>ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".<br><br>EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".<br><br>EXCEPTION_PARAMETER1:&nbsp; 00000000<br><br>EXCEPTION_PARAMETER2:&nbsp; 9122086c<br><br>READ_ADDRESS:&nbsp; 9122086c <br><br>FOLLOWUP_IP: <br>agcore!CFrameworkElement::SetValue+1d7<br>6c914fd4 84c0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; test&nbsp;&nbsp;&nbsp; al,al<br><br>NTGLOBALFLAG:&nbsp; 0<br><br>APPLICATION_VERIFIER_FLAGS:&nbsp; 0<br><br>CONTEXT:&nbsp; 0b11f8a4 -- (.cxr 0xb11f8a4)<br>eax=9122086c ebx=00000000 ecx=05f20ae8 edx=6c90ffff esi=00000000 edi=04b5e9d8<br>eip=9122086c esp=0b11fb70 ebp=0b11fb8c iopl=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nv up ei pl nz na po nc<br>cs=001b&nbsp; ss=0023&nbsp; ds=0023&nbsp; es=0023&nbsp; fs=003b&nbsp; gs=0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; efl=00010202<br>9122086c ??&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ???<br>Resetting default scope<br><br>PRIMARY_PROBLEM_CLASS:&nbsp; INVALID_POINTER_READ<br><br>BUGCHECK_STR:&nbsp; APPLICATION_FAULT_INVALID_POINTER_READ<br><br>LAST_CONTROL_TRANSFER:&nbsp; from 6c914fd4 to 9122086c<br><br>IP_ON_HEAP:&nbsp; 9122086c<br><br>STACK_TEXT:&nbsp; <br>9122086c unknown+0x0<br>6c914fd4 agcore!CFrameworkElement::SetValue+0x1d7<br>6c9224fc agcore!CShape::SetValue+0x72<br>6c922544 agcore!CEllipse::SetValue+0x3b<br>6c91aac7 agcore!CAnimation::DoSetValue+0x50<br>6c95859b agcore!CAnimation::UpdateAnimationUsingKeyFrames+0x3b5<br>6c9b7df4 agcore!CAnimation::UpdateAnimation+0x184<br>6c91716e agcore!CTimeline::ComputeState+0x13a<br>6c91720d agcore!CTimelineGroup::ComputeState+0x8c<br>6c916d73 agcore!CStoryboard::ComputeState+0x48<br>6c9169f7 agcore!CTimeManager::Tick+0x79<br>6c916a59 agcore!CCoreServices::Tick+0x21<br>6c99f796 agcore!CCoreServices::Draw+0x140<br>6c916af2 agcore!CCoreServices::Draw+0x2d<br>6d8314f5 npctrl!CXcpBrowserHost::OnTick+0x1b1<br>6d8033c2 npctrl!CXcpDispatcher::Tick+0xf3<br>6d8027c6 npctrl!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0xcd<br>6d802709 npctrl!CXcpDispatcher::WindowProc+0xb8<br>7e418734 USER32!InternalCallWinProc+0x28<br>7e418816 USER32!UserCallWinProcCheckWow+0x150<br>7e4189cd USER32!DispatchMessageWorker+0x306<br>7e418a10 USER32!DispatchMessageW+0xf<br>4093e6b3 IEFRAME!CTabWindow::_TabWindowThreadProc+0x189<br>7c80b729 kernel32!BaseThreadStart+0x37<br><br><br>STACK_COMMAND:&nbsp; .cxr 0B11F8A4 ; kb ; dds b11fb70 ; kb<br><br>SYMBOL_STACK_INDEX:&nbsp; 1<br><br>SYMBOL_NAME:&nbsp; agcore!CFrameworkElement::SetValue+1d7<br><br>FOLLOWUP_NAME:&nbsp; MachineOwner<br><br>MODULE_NAME: agcore<br><br>IMAGE_NAME:&nbsp; agcore.dll<br><br>DEBUG_FLR_IMAGE_TIMESTAMP:&nbsp; 4a8a2b0b<br><br>FAILURE_BUCKET_ID:&nbsp; INVALID_POINTER_READ_c0000005_agcore.dll!CFrameworkElement::SetValue<br><br>BUCKET_ID:&nbsp; APPLICATION_FAULT_INVALID_POINTER_READ_agcore!CFrameworkElement::SetValue+1d7<br><br>WATSON_STAGEONE_URL:&nbsp; http://watson.microsoft.com/StageOne/iexplore_exe/7_0_6000_16850/49f04471/coreclr_dll/3_0_40818_0/4a8a2a97/c0000005/00060634.htm?Retriage=1<br><br>Followup: MachineOwner<br>0:020&gt; kb<br>ChildEBP RetAddr&nbsp; Args to Child&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>0b11f6f0 7b7e0693 9122086c 9122086c 045fdc60 coreclr!VirtualCallStubManager::predictStubKind+0x7d<br>0b11f704 7b7e06de 9122086c 0b11f8a4 0b11f730 coreclr!VirtualCallStubManager::getStubKind+0x10<br>0b11f714 7b8f8db2 9122086c 0b11f72c 0b11f8a4 coreclr!VirtualCallStubManager::FindStubManager+0x20<br>0b11f730 7b8f8f08 0b11f888 0b11f8a4 0b11f7f0 coreclr!AdjustContextForVirtualStub+0x23<br>0b11f74c 7b8f93c5 c0000005 089b639d 00004000 coreclr!CLRVectoredExceptionHandlerPhase3+0x53<br>0b11f780 7b8f9d5d 0b11f7f0 089b63b1 00000000 coreclr!CLRVectoredExceptionHandlerPhase2+0x20<br>0b11f7ac 7b892241 0b11f7f0 089b63c5 7c97e3c0 coreclr!CLRVectoredExceptionHandler+0xad<br>0b11f7d8 7c9444a8 0b11f7f0 0b11f888 0b11f888 coreclr!CLRVectoredExceptionHandlerShim+0x57<br>0b11f7f8 7c933f56 0b11f888 0b11f8a4 00000000 ntdll!RtlCallVectoredExceptionHandlers+0x48<br>0b11f870 7c90e48a 0b11f888 0b11f8a4 0b11f888 ntdll!RtlDispatchException+0x19<br>0b11f870 9122086c 0b11f888 0b11f8a4 0b11f888 ntdll!KiUserExceptionDispatcher+0xe<br>WARNING: Frame IP not in any known module. Following frames may be wrong.<br>0b11fb6c 6c914fd4 10bc0c84 04b5e9d8 054487ac 0x9122086c<br>0b11fb8c 6c9224fc 054487ac 10bc0c84 054487ac agcore!CFrameworkElement::SetValue+0x1d7<br>0b11fba8 6c922544 054487ac 10bc0c84 054487ac agcore!CShape::SetValue+0x72<br>0b11fbc0 6c91aac7 054487ac 10bc0c84 00000000 agcore!CEllipse::SetValue+0x3b<br>0b11fbf0 6c95859b 10bc0be0 04b5e9d8 00000000 agcore!CAnimation::DoSetValue+0x50<br>0b11fc30 6c9b7df4 0b11fca4 0b11fc88 10bc0be0 agcore!CAnimation::UpdateAnimationUsingKeyFrames+0x3b5<br>0b11fc4c 6c91716e 00000003 00000000 00000000 agcore!CAnimation::UpdateAnimation+0x184<br>0b11fc9c 6c91720d 3ea20800 0b11fcec 00000000 agcore!CTimeline::ComputeState+0x13a<br>0b11fcbc 6c916d73 048cbd88 0b11fcec 0b11fcf4 agcore!CTimelineGroup::ComputeState+0x8c<br><br>P/Invoke调用dll函数,将本来void的函数声明为带返回值的,在win7出错,在winxp下正常,理由是?http://advdbg.org/forums/4203/ShowPost.aspxWed, 13 Oct 2010 07:30:58 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:4203不及格的程序员-八神10情况描述: <br /> <br />我在win32 dll 项目中封装了段asm代码调用另一个dll中的函数. 在我的win32 dll项目中公开的函数声明如下: <br /> 1 extern "C" _declspec(dllexport) void No(const char* source, char* result) <br /> 2 { <br /> 3 _asm <br /> 4 { <br /> 5 mov eax, source <br /> 6 push eax <br /> 7 mov eax, result <br /> 8 push eax <br /> 9 call pFun //pFun 是我从另一个dll中用GetProcAddress函数提取的函数地址,这个函数规则是被调用者清除栈; <br />10 //下面使用eax寄存器,向调用者返回结果,而实际上我们的函数声明并没有返值,这种调用在我的winxp上调用是成功的. <br />11 //但是在另一台win7系统中,当这此函数返回时却总是失败,报异常. <br />12 //由于我的最终项目是wcf项目托管于iis7下,当发生异常时,提示ntdll堆被破坏..... <br />13 mov eax,dword ptr [result] <br />14 add eax,1 <br />15 mov dword ptr [result],eax <br />16 } <br />17 } <br /> <br /> <br />下面是我在C#项目中声明的函数导入代码; <br /> <br />[DllImport("No.dll", CallingConvention = CallingConvention.Cdecl)] <br /> <br />private static extern void No(string strArg0, byte[] strArg1); //此种调用方式,在winxp,win7系统都可以正常运行,结果是通过strArg1传递的. <br /> <br /> <br /> <br />//注意:下面代码声明了string类型的返回值,也就是获取eax返回的地址. <br /> <br />private static extern string No(string strArg0, byte[] strArg1); <br /> <br /> <br /> <br />此种调用方式不能在win7系统下运行,但也是仅仅是第一次报异常,当第二次调用此函数时,就可以通过返回值取到结果. <br /> <br />我的问题是为什么这种方式会报异常呢? <br /> <br />难道win7下CLR jit编译做了更严格的内存检查吗? <br /> <br />或者与JIT没有关系,而是由于系统api的低层函数有更多的检查呢? <br /> <br />我目前还没有找到这个问题所在,但我非常有兴趣....想知道原因,与大家共同讨论一次吧.请教一个问题http://advdbg.org/forums/3111/ShowPost.aspxFri, 25 Sep 2009 07:06:28 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:3111mingjun1问题描述:<br><br>一个程序可以执行宏,这里的宏其实是动态产生的vb.net代码,然后动态地编译执行,可是没有该程序没有单步执行或者察看变量的功能,请问如果想增加这两个功能,应该怎么做?大概的思路怎么样?<br><br>谢谢大家windbg+sos 调试dotnet release版本的程序堆栈信息问题。http://advdbg.org/forums/323/ShowPost.aspxFri, 27 Apr 2007 08:28:06 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:323lzh7用windbg+sos 调试dotnet 程序。为了验证自己的一些想法,写了个简单的例子。 <br />namespace Debug <br />{ <br /> /// <br /> /// Summary description for Class1. <br /> /// <br /> class Debug <br /> { <br /> /// <br /> /// The main entry point for the application. <br /> /// <br /> [STAThread] <br /> static void Main(string[] args) <br /> { <br /> Test obj = new Test(); <br /> obj.Fun1(); <br /> } <br /> } <br /> <br /> public class Test <br /> { <br /> public void Fun1() <br /> { <br /> Fun2(); <br /> } <br /> <br /> private void Fun2() <br /> { <br /> Fun3(); <br /> } <br /> <br /> private void Fun3() <br /> { <br /> Fun4(); <br /> } <br /> <br /> private void Fun4() <br /> { <br /> int length =0; <br /> string str = null; <br /> length = str.Length; <br /> this.Fun5(length); <br /> } <br /> <br /> private void Fun5(int a) <br /> { <br /> <br /> } <br /> } <br /> <br />} <br />可以看出fun4() 里有null reference问题。 <br />问题是这样的:release版本。用windbg启动调试后,出现异常,看到的调用堆栈只到了Main(),再详细的信息就看不到了。 <br />而Debug版本,出现Access Vialation 后。 <br />用!dumpstack 可以看到详细的调用堆栈 <br />main()--&gt;fun1()--&gt;fun2()---&gt;fun3()--&gt;fun4()--fun5(). <br /> <br />这是怎么回事呢,一般产品里的dll 都是release版本的 <br />那样的话,用windbg调试的时候看到的堆栈信息不够全啊。(我已经用了正确的符号)为什么我的net2.0的调式符号下载不下来呢http://advdbg.org/forums/261/ShowPost.aspxThu, 04 Jan 2007 06:25:14 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:261lzh2<P>我设置的符号路径是 SRV*C:\netsymbols\symbols*http://msdl.microsoft.com/download/symbols</P> <P>但就是获取不下来。</P> <P>打开!sym noisy 看了以下</P> <P>SYMSRV:&nbsp; C:\netsymbols\symbols\mscorlib.pdb\06A826D298CB41A3B63D7BDACDDAF9321\mscorlib.pdb not found<BR>SYMSRV:&nbsp; <A href="http://msdl.microsoft.com/download/symbols/mscorlib.pdb/06A826D298CB41A3B63D7BDACDDAF9321/mscorlib.pdb">http://msdl.microsoft.com/download/symbols/mscorlib.pdb/06A826D298CB41A3B63D7BDACDDAF9321/mscorlib.pdb</A> not found<BR>DBGHELP: C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\60cc3284b1e13b43b246050745b8de7e\mscorlib.pdb - file not found<BR>DBGHELP: mscorlib.pdb - file not found<BR>*** WARNING: Unable to verify checksum for C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\60cc3284b1e13b43b246050745b8de7e\mscorlib.ni.dll<BR>*** ERROR: Module load completed but symbols could not be loaded for C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\60cc3284b1e13b43b246050745b8de7e\mscorlib.ni.dll<BR>DBGHELP: mscorlib_ni - no symbols loaded</P> <P>dll 是从GAC里面加栽的已经编译过的。为什么找调试符号的时候是这个 <FONT color=#0000ff><U>06A826D298CB41A3B63D7BDACDDAF9321 呢 而不是</U></FONT><FONT color=#000000>60cc3284b1e13b43b246050745b8de7e\ 这串数字是根据什么计算出来的。为什么下载不下来呢??</FONT></P>请教个问题。windbg 调试一个dotnet 1.1 程序http://advdbg.org/forums/263/ShowPost.aspxFri, 12 Jan 2007 11:37:28 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:263lzh1<P>我用windbg 调试一个dotnet程序。</P> <P>里面有个方法。Page_Load() 出现了NullReferenceException.</P> <P>用windbg 可以定位到这个个方法上,也可以定位到某条具体的汇编指令上。(大体上是 ****** cmp [ecx] ecx )</P> <P>看看前边几句确实是ecx 被置成了0。</P> <P>但是Page_Load() 这个方法很大,反汇编后,不知道出现问题的那几句汇编的代码对应程序里的哪一句代码</P> <P>这种情况怎么办呢。</P> <P>谢谢</P>net2.0 winform 窗体中嵌入了一个ocx控件,别的窗体打开这个窗体,出现Access violation 这种错误,我该怎么调试?请指点一下http://advdbg.org/forums/254/ShowPost.aspxTue, 02 Jan 2007 08:06:10 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:254lzh1Access violation - code c0000005 (first chance)<BR>First chance exceptions are reported before any exception handling.<BR>This exception may be expected and handled.<BR>eax=00000001 ebx=0282ac48 ecx=7b4b7bf8 edx=02df47f0 esi=02bafbf8 edi=ffffffff<BR>eip=06622e90 esp=02bafbc0 ebp=02bafbe0 iopl=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nv up ei pl nz na po nc<BR>cs=001b&nbsp; ss=0023&nbsp; ds=0023&nbsp; es=0023&nbsp; fs=003b&nbsp; gs=0000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; efl=00010202<BR>06622e90 3b5004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmp&nbsp;&nbsp;&nbsp;&nbsp; edx,dword ptr [eax+4] ds:0023:00000005=????????<BR>A very good collection about trace api of .nethttp://advdbg.org/forums/53/ShowPost.aspxThu, 16 Mar 2006 13:24:43 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:53Raymond1<P><A href="http://blogs.msdn.com/kcwalina/archive/2005/09/20/TracingAPIs.aspx">http://blogs.msdn.com/kcwalina/archive/2005/09/20/TracingAPIs.aspx</A></P> <DIV class=BlogPostArea> <H4 class=BlogPostHeader>Tracing APIs in .NET Framework 2.0 </H4> <DIV class=BlogPostContent> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>I found a very encouraging post about the new tracing APIs that we added to .NET Framework 2.0. <A href="http://gendotnet.com/Blog/archive/2005/02/25/679.aspx"><U><FONT color=#0000ff>Kathleen Dollard wrote</FONT></U></A>: “<EM>Sometimes Microsoft absolutely amazes me. I know .NET is big, and I know that the 2.0 release is rather overwhelming even to Softies, but when there is a real jewel hidden in there, you’d think someone would know about.”</EM></FONT></P> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face=Verdana>For those who want to learn more about the API. Here are some excellent posts by Mike Rousos (a member of the BCL team) describing the features:</FONT></P> <UL> <LI class=MsoNormal style="MARGIN: 0in 0in 0pt"><A href="http://blogs.msdn.com/bclteam/archive/2005/03/15/396431.aspx"><FONT face=Verdana color=#0000ff><U>A Tracing Primer – Part I</U></FONT></A><FONT face=Verdana>&nbsp;- is a simple introduction to the tracing APIs.</FONT> <LI class=MsoNormal style="MARGIN: 0in 0in 0pt"><A href="http://blogs.msdn.com/bclteam/archive/2005/09/21/472015.aspx"><FONT face=Verdana color=#0000ff><U>A Tracing Primer – Part II (A)</U></FONT></A><FONT face=Verdana>&nbsp;- talks mainly about filtering events </FONT> <LI class=MsoNormal style="MARGIN: 0in 0in 0pt"><A href="http://blogs.msdn.com/bclteam/archive/2005/09/21/472021.aspx"><FONT face=Verdana color=#0000ff><U>A Tracing Primer – Part II (B)</U></FONT></A><FONT face=Verdana>&nbsp;- talks about developing custom trace listeners (plugins that will channel your trace events to wherever you desire). </FONT> <LI class=MsoNormal style="MARGIN: 0in 0in 0pt"><A href="http://blogs.msdn.com/bclteam/archive/2005/09/21/472049.aspx"><FONT face=Verdana color=#0000ff><U>A Tracing Primer – Part II (C) </U></FONT></A><FONT face=Verdana>- talks about some details of who the configuration files are interpreted.</FONT></LI></UL></DIV> <DIV class=BlogPostFooter>Published Tuesday, September 20, 2005 7:00 PM by <A id=_ctl0____ctl0____ctl0__ctl0_bcr__ctl0___Entry___AuthorLink href="http://blogs.msdn.com/user/Profile.aspx?UserID=3414"><U><FONT color=#0000ff>kcwalina</FONT></U></A> <BR>Filed Under: <A id=_ctl0____ctl0____ctl0__ctl0_bcr__ctl0___Entry___Tags___Categories__ctl1_Link href="http://blogs.msdn.com/kcwalina/archive/category/11742.aspx"><U><FONT color=#800080>System.Diagnostics Tracing</FONT></U></A> </DIV></DIV>请教个问题。windbg+sos.dll 调试 .net 程序http://advdbg.org/forums/202/ShowPost.aspxSun, 10 Sep 2006 04:30:01 GMTe4f42b2c-e28e-435b-8fbe-636f8fa9f0b8:202lzh3<DIV><FONT face=Verdana><FONT size=2>请教个问题。windbg+sos.dll 调试 .net 程序,程序用的是net1.0.这样的话需要两个.bin文件来初始话 sos.dll.可是我不知道.bin文件下载下来后要放在哪里?</FONT></FONT></DIV> <DIV><FONT size=2>谢谢</FONT></DIV>