News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

conditional breakpoint in Windbg

Started by porphyry5, December 20, 2009, 05:16:40 PM

Previous topic - Next topic

porphyry5

With this code sequence:

pop ecx      ; restore word length
mov testbyte,cl
invoke binarysearchroutine

I set a conditional breakpoint on the invoke, thus:

`Test.asm:498` in Command window and
ecx=0xa in Condition window

which works fine, but neither of these will work

`Test.asm:498` in Command window and
testbyte=0xa in Condition window or
Test!testbyte=0xa in Condition window

Windbg recognizes the variable, thus

0:000> dv
0:000> dt Test!testbyte
0x4 ''
0:000> dt testbyte
0x4 ''
0:000> dt poi(testbyte)
Symbol not found at address 74736104.

What am I doing wrong?  Following is the debugger output.  The Access violation occurs after at least 2 occurrences of the test condition.  Thank you for your help.

Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: Test.exe
Loaded dbghelp extension DLL
Loaded ext extension DLL
Loaded exts extension DLL
Loaded uext extension DLL
Loaded ntsdexts extension DLL
*** Create process 78c
DBGHELP: Symbol Search Path: c:\windows\symbols
Symbol search path is: C:\WINDOWS\Symbols
Executable search path is: C:\masm32\Test

DBGHELP: SharedUserData - virtual symbol module
Process created: 78c.7b8
OUTPUT_PROCESS: *** Create process ***
id: 78c  Handle: 760  index: 0
  id: 7b8  hThread: 75c  index: 0  addr: 00401005
ModLoad: 00400000 00407000   Test.exe
ModLoad: 00400000 00407000   Test.exe
OUTPUT_PROCESS: *** Load dll ***
id: 78c  Handle: 760  index: 0
  id: 7b8  hThread: 75c  index: 0  addr: 00401005
  hFile: 748  base: 00400000
Loading symbols for 00400000         Test.exe ->   Test.exe
*** WARNING: Unable to verify checksum for Test.exe
DBGHELP: Test - private symbols & lines
         c:\windows\symbols\Test.pdb
ModLoad: 7c900000 7c9af000   ntdll.dll
ModLoad: 7c900000 7c9af000   ntdll.dll
OUTPUT_PROCESS: *** Load dll ***
id: 78c  Handle: 760  index: 0
  id: 7b8  hThread: 75c  index: 0  addr: 00401005
  hFile: 748  base: 00400000
  hFile: 74c  base: 7c900000
ModLoad: 7c800000 7c8f6000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 7c800000 7c8f6000   C:\WINDOWS\system32\kernel32.dll
OUTPUT_PROCESS: *** Load dll ***
id: 78c  Handle: 760  index: 0
  id: 7b8  hThread: 75c  index: 0  addr: 00401005
  hFile: 748  base: 00400000
  hFile: 73c  base: 7c800000
  hFile: 74c  base: 7c900000
(78c.7b8): Break instruction exception - code 80000003 (first chance)
eax=00241eb4 ebx=7ffde000 ecx=00000000 edx=00000001 esi=00241f48 edi=00241eb4
eip=7c90120e esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
Loading symbols for 7c900000        ntdll.dll ->   
DBGHELP: c:\windows\symbols\ntdll.pdb - file not found
ntdll.dll
DBGHELP: ntdll - public symbols 
         c:\windows\symbols\dll\ntdll.pdb
ntdll!DbgBreakPoint:
7c90120e cc              int     3
0:000> g
(78c.7b8): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=004043c8 ecx=00000004 edx=00000001 esi=003b1000 edi=00404835
eip=00401510 esp=0012ffb8 ebp=0012fff0 iopl=0         nv up ei pl nz ac pe cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010217
Test!start+0x4a9:
00401510 8a06            mov     al,byte ptr [esi]          ds:0023:003b1000=??

UtillMasm

WinDbg ::)
sir, can you make a video tutorial for windbg? :toothy

ecube

any reason you don't know use ollydbg?