Not Removing Hardware Breakpoints?

Find a Bug? Have a Problem? Like to Suggest a Feature? Do it Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

Not Removing Hardware Breakpoints?

Postby Shynd » Tue Dec 04, 2007 10:51 pm

About four hours ago, I was debugging a game and set a hardware breakpoint on its WSOCK32.dll:send instruction. I did my thing, whatever, closed the game, closed MHS. Now, four hours later, when I reopen the same game in OLLYDBG, that breakpoint still breaks:
Image

I didn't even know that's possible. I didn't re-set the breakpoint in OLLY. There's a few other breaks that hit on that game, too, that I didn't set at all. One is at 0x55789C (in the game executable module) and it doesn't have anything to do with anything. It seems to clear out if I restart my computer.
User avatar
Shynd
Acker
 
Posts: 68
Joined: Fri Jan 05, 2007 2:11 am

Postby Shynd » Tue Dec 04, 2007 10:59 pm

Update: The last time this happened, restarting fixed it. Now, it seems, restarting doesn't fix it. I have no idea, now, if this was an MHS problem or a my computer problem.

After restart, however, the breakpoint at WSOCK32.recv was no longer active. The others were, though. Weird.
User avatar
Shynd
Acker
 
Posts: 68
Joined: Fri Jan 05, 2007 2:11 am

Postby L. Spiro » Tue Dec 04, 2007 11:09 pm

OllyDbg resets breakpoints that it had set when you reload the process.
This is the only way you could get your breakpoints back after closing the game (unless the game never truly closed, which I assume is not a possibility).

All thread flags are cleared when the game closes, so it is impossible for the break to be there afterwards.


As for MHS’s working with the game, all breakpoints are removed as long as MHS closes normally (and it typically does).
But removing a hardware breakpoint does not require clearing the DR0-Dr3 registers; it requires only changing a single bit in the DR7, but when MHS closes for good it also unsets the respective Dr0-3 register.


Also note that if the hardware breakpoint is still set but no debugger is attached to the game, the game will crash on an unhandled trap exception.


L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby Shynd » Tue Dec 04, 2007 11:09 pm

Update: I deleted Darkages.udd and Darkages.bak from my OLLYDBG folder and everything went back to normal. That's weird as hell. I don't know if that had something to do with OLLY and MHS or just OLLY or what. I apologize if this isnt' a bug with your program.
User avatar
Shynd
Acker
 
Posts: 68
Joined: Fri Jan 05, 2007 2:11 am


Return to Bugs/Problems/Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests

cron