How can I continue after a breakpoint in windbg?
Asked Answered
C

1

5

I have set a breakpoint which should print a pointer and then continue, because I don't want to stop there.

 bu 410cc8 ".printf \"Class: %08lX   Filebuffer: %08X\\n\", eax, edx; g"

The problem with this is now, when I singlestep and such a breakpoint is fired, like here:

 1                 mov     eax, [ebp+var_10]
 2                 lea     edx, [eax+2Ch]
 3                 mov     eax, ebx
 4                 call    ReadFileFkt_2
 5                 mov     eax, [ebp+var_10]

So when I'm on line 4, and step over it, the above breakpoint is fired and the message is printed. But then the debugger never comes back, because in the breakpoint I use "g" to continue, so the single step is erased.

If I don't use "g" then the breakpoint will be hit and the debugger stops there, so I have to track my way back to where I came from. Of course I could set a breakpoint after the call, but then I would have to remember doing this in other parts of the code as well, because I don't know when the breakpoint is fired from deep within some calling hierarchy.

Crevasse answered 12/10, 2013 at 12:43 Comment(0)
I
10

Use 'gc' (go from conditional breakpoint) instead of 'g' (go). This command was designed specifically for the problem you have.

Inexpungible answered 12/10, 2013 at 18:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.