본문 바로가기

.NET/Debugging

(35)
windbg - .NET 4.0 이상의 환경에서 모든 DLL에 대한 심벌 파일을 로드하는 파이썬 스크립트 http://sysnet.pe.kr/221118501980지난 글에서 .NET 4.0 이상의 환경에서 DLL에 대한 심벌 파일 로드에 대해 알아봤습니다. windbg - .NET 4.0 이상의 환경에서 DLL의 심볼 파일 로드 방법 ; http://www.sysnet.pe.kr/2/0/11330 그런데, 규모가 좀 있는 프로그램이라면 DLL이 꽤나 많을 텐데 언제 저런 작업을 하고 있겠습니까? ^^ 그래서 예전에 소개한 pykd를 이용해, windbg에서 python 스크립트 실행하는 방법 - pykd ; http://www.sysnet.pe.kr/2/0/11227 다음과 같은 확장 스크립트(symbol_net.py)를 만들었습니다. from pykd import * def getItem(text, ke..
windbg - .NET 4.0 이상의 환경에서 DLL의 심벌 파일 로드 방법 http://sysnet.pe.kr/221118490429전에 설명한 데로 .NET 4.0부터 DLL 로드를 LoadLibrary Win32 API를 이용하지 않기 때문에 모듈 목록에 DLL이 나타나지 않습니다. coreclr 소스 코드로 알아보는 .NET 4.0의 모듈 로딩 함수 ; http://www.sysnet.pe.kr/2/0/11326 이 때문에 !savemodule 등의 명령어를 위해 모듈에 대한 주소가 필요할 때는 임시로 !name2ee의 출력 결과를 이용해야만 했는데요. windbg의 lm 명령으로 보이지 않는 .NET 4.0 ClassLibrary를 명시적으로 로드하는 방법 ; http://www.sysnet.pe.kr/2/0/11256 위의 내용을 정리하면 모듈 주소를 .reload /..
windbg - .NET 4.0 응용 프로그램의 Main 메서드에 Breakpoint 걸기 http://sysnet.pe.kr/221116593392지난 글에서 한번 설명했는데, .NET 4.0 응용 프로그램의 Main 함수에 BreakPoint 걸기 ; http://www.sysnet.pe.kr/2/0/1021 약간 바뀌어서 다시 정리합니다. ^^ 우선, Main 메서드에서 곧바로 예외를 발생하는 코드를 넣고 windbg에서 살펴보면 다음과 같은 콜 스택을 확인할 수 있습니다. 0:000> k # Child-SP RetAddr Call Site 00 00000043`079be970 00007fff`225232ea KERNELBASE!RaiseException+0x68 01 00000043`079bea50 00007fff`2252311a clr!RaiseTheExceptionInternalOn..
Debugging 사례 제니퍼 닷넷 적용 사례 (7) - 노후된 스토리지 장비로 인한 웹 서비스 Hang (멈춤) 현상 개발자2017.07.08. 21:25http://sysnet.pe.kr/221047031124번역하기 전용뷰어 보기이번 고객사의 사례는 좀 특이하게도, 제니퍼 닷넷으로 현상만 확인할 수 있었던 경우입니다. 내용은 간단합니다. 서비스 도중 알 수 없는 이유로 인해 더 이상 웹 요청에 대한 처리가 되지 않고 제니퍼 닷넷 제품은 그 시점에 처리율이 0으로 떨어지는 모습만을 보여주는 현상이었습니다. 이런 경우, 어쨌든 해당 고객사의 성능 문제가 나왔기 때문에 일종의 서비스 차원에서 ^^ 제가 분석해 주기도 합니다. 사실 달리 방법이 없습니다. 이럴 때는 풀 덤프를 떠서 분석해야 합니다. 풀 덤프 파일을 남기는 방법 ..
모든 .net thread에 stack 정보 보기 명령어 ~*e !CLRStack
.Net Debugging CUP 100% http://www.mono-software.com/blog/post/Mono/157/When-the-going-gets-tough-the-tough-get-WinDbg/ When the going gets tough, the tough get WinDbg 03/18/2012 - When I forced myself to use WinDbg for the first time, it looked to me like some alien jibberish. I was never into the low lever assembler kind of stuff, but as I was slowly learning its basics, it turned to be a reliable companion over the ..
How to disable optimizations when debugging Reference Source 좋은 글이라 생각되어 한번 올려봅니다. 출처: http://blogs.msdn.com/b/sburke/archive/2008/01/29/how-to-disable-optimizations-when-debugging-reference-source.aspx When you debug code in the .NET Framework using the newly available Reference Source functionality in VS 2008, you may notice that many variables are not available for inspection.This is because you're debugging against retail-optimized code. In many cases..
!address -summary explained 출처 : http://blogs.msdn.com/b/webtopics/archive/2010/04/02/address-summary-explained.aspxIn order to debug any high memory issue we rely heavily on the output of !address –summary command [You’ll find !address –summary as the part of Ext.dll extension]. We can interpret quite a few things from it which can help us in further debugging. Here’s how For example (for 32 bit app) 0:027> !address –summ..