Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I continue after a breakpoint in windbg?

Tags:

windbg

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.

like image 933
Devolus Avatar asked Oct 12 '13 12:10

Devolus


1 Answers

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

like image 121
Uri Avatar answered Oct 31 '22 14:10

Uri