tags:

views:

29

answers:

1

I'd like to set a breakpoint at a certain function, and each time it breaks, I'd like to search a memory range for a certain string. If that string exists, I'd like to not continue. If it does, then continue. Any suggestions? I'm thinking it'd look something like this:

.foreach /s line (s -a 0 L?0xfffffff "UNIQUE_STRING") { .if (line =~ "UNIQUE_STRING") { .break } .else { gc } }

I'm not too familiar with the .foreach commmand, so I might have gotten it a little wrong. My other idea was something like this:

.if ((.shell -ci "s -a 0 L?0xfffffff \"UNIQUE_STRING\"" findstr "UNIQUE_STRING") != "") {} .else { gc }

Has anybody done something like this? (sorry, some of that is extreme pseudo code)

A: 

Have you thought about doing this as an extension instead? IDebugDataSpaces::SearchVirtual returns an error if the pattern isn't found, which would make this easier on you.

-scott

snoone