2010-07-11 6 views
5

XP에서 제대로 실행되지만 Vista/7에서는 작동하지 않는 C# 응용 프로그램을 작성했습니다. 문제를 분석하기 위해 응용 프로그램 덤프 (dmp 파일)가 있습니다. C#에서 스택 추적을 얻는 방법을 이해할 수 없습니다 (물론 소스 코드가 있음). 어떤 도움을 주시면 감사하겠습니다C# 응용 프로그램 덤프 파일을 분석하십시오.

[email protected]() 
[email protected]() + 0xc bytes 
System.Windows.Forms.ni.dll!68bb8ea8() 
[Frames below may be incorrect and/or missing, no symbols loaded for System.Windows.Forms.ni.dll] 
System.Windows.Forms.ni.dll!68bb8ea8() 
System.Windows.Forms.ni.dll!68bb8997() 
System.Windows.Forms.ni.dll!68bb87e1() 
System.Windows.Forms.ni.dll!68b75931() 
[email protected]() + 0x33 bytes  
[email protected]() + 0x9f bytes 
mscorwks.dll!MethodDesc::CallDescr() + 0x15a bytes 
mscorwks.dll!MethodDesc::CallTargetWorker() + 0x1f bytes 
mscorwks.dll!MethodDescCallSite::CallWithValueTypes_RetArgSlot() + 0x1a bytes 
mscorwks.dll!ClassLoader::RunMain() - 0x39040 bytes  
mscorwks.dll!Assembly::ExecuteMainMethod() + 0xa4 bytes  
mscorwks.dll!SystemDomain::ExecuteMainMethod() + 0x416 bytes 
mscorwks.dll!ExecuteEXE() + 0x49 bytes 
[email protected]() + 0x98 bytes 
mscoreei.dll!71f455ab()  
[email protected]() + 0x227 bytes 
[email protected]() + 0x8 bytes 
[email protected]@12() + 0x12 bytes  
[email protected]() + 0x27 bytes 
[email protected]() + 0x1b bytes 

: 나는 문자로드하지만 관리 코드를로드하지 않는 것, 여기에 스택 추적입니다.

답변

5

덤프 파일을 분석하는 것은 마음이 희미하지 않고 약간의 운동이 필요합니다. 훌륭한 소개는 the Debugging Tools for Windows, part of the .NET SDKthe Debugging Tools for Windows, SOS 디버거 확장 (기본 호출로 관리 코드 매핑에 필요함) 및 SOSEX debugger extension을 사용하는 방법을 보여주는 Advanced .NET Debugging의 첫 번째 몇 장입니다. SOS에 명령.

이전에 NTSD, WinDbg, SOS를 사용한 적이 없거나 상대 가상 주소로 용어가 울리지 않는 경우이 책의 첫 장을 읽는 것이 좋습니다. 단 몇 시간 만 투자하면 갑자기 완전히 새로운 세상이 열리게됩니다. 디버깅을 산들 바람처럼 만드는 것은 아닙니다 (문제가 복잡 할 때가 거의 없습니다).하지만 이런 종류의 문제를 해결할 수있는 올바른 방법을 보여줍니다.

위의 덤프를 보면 그냥 많이 알려주지 않습니다. 두려워요. Visual Studio 내에서 오류를 재현 할 수 없으면 NTSD 또는 WinDbg가 친구입니다. 내가 여기서 알 수있는 유일한 것은 엔트리 포인트가 mscoree.dll의 _CorExeMain이라는 것입니다. 그러나 이것이 모든 .NET 어셈블리의 부트 스트랩입니다. 나중에 양식이로드되고 일부 코드가 실행되지만 정확히 무엇입니까? 실행 파일, PDB 및 원본 파일이 없으면 유용하다고 말할 수 없습니다.

관련 문제