이 영역을 누르면 첫 페이지로 이동
웬디의 기묘한 이야기 블로그의 첫 페이지로 이동

웬디의 기묘한 이야기

페이지 맨 위로 올라가기

웬디의 기묘한 이야기

C/C++ Windows Hooking 개발자의 블로그 입니다! 이곳은 개발 외에도 저의 취미들이 공유되는 기묘한 이야기가 펼쳐집니다.

[Debugging] 프로세스 크래시 발생시 덤프 남기기

  • 2016.01.22 22:12
  • ⌨ DEVELOPMENT/Debugging
반응형

User Process Crash Dump

윈도우 XP에서는 닥터 왓슨을 이용하여 크래시 덤프를 남기지만 Vista 이상에선 사라졌습니다.

Vista이상에선 WER(Windows Error Reporting) 시스템이 MS에 덤프를 전송하지만 로컬에는 남지 않도록 되어있습니다.


이런경우 간단한 설정(?) 으로 로컬에 덤프를 남기도록 설정할 수 있습니다.


https://msdn.microsoft.com/ko-kr/library/windows/desktop/bb787181(v=vs.85).aspx

 

Collecting User-Mode Dumps - Windows applications

Starting with Windows Server 2008 and Windows Vista with Service Pack 1 (SP1), Windows Error Reporting (WER) can be configured so that full user-mode dumps are collected and stored locally after a user-mode application crashes.

docs.microsoft.com


MSDN에 나와있듯이 해당 기능의 기본적으로 활성화 되어있지 않습니다.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps 해당 키는 직접 추가를 해야하며, 내부 설정값은 다음과 같습니다.

ValueDescriptionTypeDefault value
DumpFolderThe path where the dump files are to be stored. If you do not use the default path, then make sure that the folder contains ACLs that allow the crashing process to write data to the folder.

For service crashes, the dump is written to service specific profile folders depending on the service account used. For example, the profile folder for System services is %WINDIR%\System32\Config\SystemProfile. For Network and Local Services, the folder is %WINDIR%\ServiceProfiles.

REG_EXPAND_SZ%LOCALAPPDATA%\CrashDumps
DumpCountThe maximum number of dump files in the folder. When the maximum value is exceeded, the oldest dump file in the folder will be replaced with the new dump file.REG_DWORD10
DumpTypeSpecify one of the following dump types:
  • 0: Custom dump
  • 1: Mini dump
  • 2: Full dump
REG_DWORD1
CustomDumpFlags

The custom dump options to be used. This value is used only whenDumpType is set to 0.

The options are a bitwise combination of the MINIDUMP_TYPEenumeration values.

REG_DWORD

MiniDumpWithDataSegs | MiniDumpWithUnloadedModules | MiniDumpWithProcessThreadData


수동으로 추가하면 간단히 할 수 있으며, 자동을 위하여 .reg 파일을 생성하여 필요시마다 이용할 수 있습니다.


단, *.reg 파일로 만들경우 REG_EXPAND_SZ형태가 hex 값으로만 입력 가능합니다.


직접 만들기 귀찮으신분들은 제가 만들어놓은 해당 reg를 이용하시기 바랍니다.

해당 reg의 DumpFoler는 %LOCALAPPDATA%\CrashDumps 으로 설정되있으며, 원하는 경로로 변경하여 재등록 가능합니다.


usermode_dump_enable.reg

해당파일을 이용하여 등록 후 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps 경로에서 수정이 가능합니다.


위와같이 설정해놓으면 process crash 발생시 process_name.1234.dump 와 같이 name.pid.dmp 형태로 남게됩니다.



반응형
저작자표시 비영리 동일조건 (새창열림)

'⌨ DEVELOPMENT > Debugging' 카테고리의 다른 글

dump 분석을 위한 windbg 64bit 다운로드 및 설치  (0) 2019.08.04
[Assembly] 디버깅을 위한 8086 어셈블리  (0) 2016.01.17
[WinDbg] 특정 프로세스 디버깅하기  (0) 2016.01.13
[WinDbg] DriverEntry부터 디버깅 시작하기  (2) 2016.01.10
[windows] 윈도우 64bit Driver 서명없이 로드하기  (2) 2016.01.10
[WinDbg] vmware에 WinDbg 연결하여 디버깅 준비하기  (0) 2016.01.06
[WinDbg] Kernel Debugging을 위한 디버거 다운로드 및 설치!  (0) 2016.01.05
visual studio 디버깅시 디스어셈블리 확인하기  (0) 2015.12.31

댓글

이 글 공유하기

  • 구독하기

    구독하기

  • 카카오톡

    카카오톡

  • 라인

    라인

  • 트위터

    트위터

  • Facebook

    Facebook

  • 카카오스토리

    카카오스토리

  • 밴드

    밴드

  • 네이버 블로그

    네이버 블로그

  • Pocket

    Pocket

  • Evernote

    Evernote

다른 글

  • dump 분석을 위한 windbg 64bit 다운로드 및 설치

    dump 분석을 위한 windbg 64bit 다운로드 및 설치

    2019.08.04
  • [Assembly] 디버깅을 위한 8086 어셈블리

    [Assembly] 디버깅을 위한 8086 어셈블리

    2016.01.17
  • [WinDbg] 특정 프로세스 디버깅하기

    [WinDbg] 특정 프로세스 디버깅하기

    2016.01.13
  • [WinDbg] DriverEntry부터 디버깅 시작하기

    [WinDbg] DriverEntry부터 디버깅 시작하기

    2016.01.10
다른 글 더 둘러보기

정보

웬디의 기묘한 이야기 블로그의 첫 페이지로 이동

웬디의 기묘한 이야기

  • 웬디의 기묘한 이야기의 첫 페이지로 이동

검색

메뉴

  • 홈
  • 태그
  • 방명록
  • 이야기

카테고리

  • 분류 전체보기 (204)
    • MY STORY (2)
    • 📸 WALKING WITH YOU (85)
      • 아이슬란드 신혼여행 이야기 (14)
      • 대한민국 구석구석 (62)
      • CONTAX N1 + T* 28-80mm (4)
      • SAMSUNG NX3000 (1)
      • 어느 멋진 날 (4)
    • ⌨ DEVELOPMENT (80)
      • BOOK:Review (1)
      • AI (13)
      • C++ (26)
      • Python (10)
      • WIndows Hooking (9)
      • Windows Kernel (3)
      • Design Pattern (3)
      • Debugging (9)
      • Tools (0)
      • Project (1)
      • Android (1)
      • 상업용 무료폰트 (4)
    • OS (4)
      • News (0)
      • Windows 일반 (4)
    • 모바일 (2)
      • 모바일 게임 (2)
    • 멘사 퍼즐 (9)
    • 생활 꿀 TIP (7)
      • 건강 (3)
      • 일상 (2)
    • 물생활 (8)
      • 골든볼 라미네지 롱핀 (8)
    • IT 기기 (2)
    • BLOG (4)
      • TISTORY BLOG TIP (3)

최근 글

인기 글

댓글

공지사항

아카이브

태그

  • 아이슬란드
  • 신혼여행
  • c++
  • c
  • 해외여행
  • windbg
  • 카페
  • AI

나의 외부 링크

  • kernel undocument api
  • 지구 관찰자의 일기
  • 지구와 지구곰

정보

WENDYS의 웬디의 기묘한 이야기

웬디의 기묘한 이야기

WENDYS

블로그 구독하기

  • 구독하기
  • RSS 피드

방문자

  • 전체 방문자
  • 오늘
  • 어제

티스토리

  • 티스토리 홈
  • 이 블로그 관리하기
  • 글쓰기
Powered by Tistory / Kakao. © WENDYS. Designed by Fraccino.

티스토리툴바