Log in

View Full Version : breakpoint softice <-> specific file


holomorph
February 26th, 2004, 10:44
Hi all!

I'm wondering how its possible to make softice stop when my program tries to open a file ? I could use api calls like "readfile" but the program opens tons of files and i will never find the right one...
But something like "bpx readfile xyz.dat" is not possible ?

Greetings and sorry for my english ;-)

Holomorpg

AndreaGeddon
February 26th, 2004, 13:39
well you can use conditions on breakpoints, if you need to break an open operation on a given file you can set a condition on the "filename" parameter, for example if you want to break CreateFileA you know that the filename is the first parameter on stack, so once softice breaks on api entry point the pointer to file name will be on [esp+4], so you can use
bpx CreateFileA if @@(esp+4) == "yourfile.dat"
it should work, hope my memory is good!
Bye!
AndreaGeddon