관리 메뉴

kisoo

WinDBG dt 명령어에 대해서 본문

01.About Programming /2.Kernel Lab

WinDBG dt 명령어에 대해서

JamesK78 2009. 2. 4. 10:18
typedef struct _CHILD_RESULT
{
 DWORD dwDepth;
 LPVOID  lpLeftContext;
 LPVOID  lpRightContext;
}CHILD_RESULT, *PCHILD_RESULT;

typedef struct _CHECK_RESULT
{
 DWORD    dwFlags;
 DWORD    dwCheckResult;
 CHILD_RESULT  stChildResult;
 TCHAR    szResult[SZ_MAXSIZE];
 LPVOID    lpContext;
}CHECK_RESULT, *PCHECK_RESULT;

 

1) 구조체 형태 파악하기

0:000> dt _CHECK_RESULT
WinDbg_dt_test!_CHECK_RESULT
   +0x000 dwFlags          : Uint4B
   +0x004 dwCheckResult    : Uint4B
   +0x008 stChildResult    : _CHILD_RESULT
   +0x014 szResult         : [1024] Wchar
   +0x814 lpContext        : Ptr32 Void


 

2)구조체에 설정된 값 확인하기

0:000> dt _CHECK_RESULT 0x27f6f8
WinDbg_dt_test!_CHECK_RESULT
   +0x000 dwFlags          : 1
   +0x004 dwCheckResult    : 4
   +0x008 stChildResult    : _CHILD_RESULT
   +0x014 szResult         : [1024]  "Check_WinDBG_dt_Command function call"
   +0x814 lpContext        : (null)


 

2-1)구조체 값 확인하기 (심볼이 설정되었을때)

0:000> dt stChkResult
Local var @ 0x27f6f8 Type _CHECK_RESULT
   +0x000 dwFlags          : 1
   +0x004 dwCheckResult    : 4
   +0x008 stChildResult    : _CHILD_RESULT
   +0x014 szResult         : [1024]  "Check_WinDBG_dt_Command function call"
   +0x814 lpContext        : (null)

 

3) 구조체 특정 필드 확인하기 
0:000> dt _CHECK_RESULT dwCheckResult
WinDbg_dt_test!_CHECK_RESULT
   +0x004 dwCheckResult : Uint4B

 

3-1)구조체 특정 필드 값 확인하기 
0:000> dt _CHECK_RESULT dwCheckResult 0x27f6f8
WinDbg_dt_test!_CHECK_RESULT
   +0x004 dwCheckResult : 4
0:000> dt _CHECK_RESULT stChildResult 0x27f6f8
WinDbg_dt_test!_CHECK_RESULT
   +0x008 stChildResult : _CHILD_RESULT


 

4) 구조체 내에 있는 구조체 값 확인하기

0:000> dt _CHILD_RESULT 0x27f6f8+0x008
WinDbg_dt_test!_CHILD_RESULT
   +0x000 dwDepth          : 0
   +0x004 lpLeftContext    : (null)
   +0x008 lpRightContext   : (null)

 

5) 구조체에 있는 모든 값 나열(펼처서)해서 보기
0:000> dt -r _CHECK_RESULT 0x27f6f8
WinDbg_dt_test!_CHECK_RESULT
   +0x000 dwFlags          : 1
   +0x004 dwCheckResult    : 4
   +0x008 stChildResult    : _CHILD_RESULT
      +0x000 dwDepth          : 0
      +0x004 lpLeftContext    : (null)
      +0x008 lpRightContext   : (null)
   +0x014 szResult         : [1024]  "Check_WinDBG_dt_Command function call"
   +0x814 lpContext        : (null)

Comments