Hi, everybody here,
I want windbg to stop when my target program opens certain file,
So I tried:
bp CreateFileA “.if($scmp(poi(esp+4),"c:\foo.txt")==0){.echo hit!!!;}.else{g;}”
but it doesn’t work. I also tried:
bp CreateFileA “r $t1=poi(esp+4);.if($scmp($t1,"c:\foo.txt")==0){.echo hit!!!;}.else{g;}”
It doesn’t work too.
So, how to specify the parameter of $scmp to refernce to a string in the debuggee’s address space?
Anyone can help me about this? TIA.