views:

231

answers:

2

Has anyone got hardware breakpoints to work on 64bit XP and if so how?

We have an application that uses hardware breakpoints this has worked on 32 bit XP and 32 bit Vista operating systems for sometime now. However having ported our code to 64 bit we get a crash when the app is run on 64 bit XP but not when run on 64 bit Vista. The app is compiled and built on XP.

We have isolated this down to thread resumption after setting a breakpoint (DR7=1). The crash occurs if we raise a file dialog box and the GUI controls on forms are rather flaky. Strangely, if after setting the breakpoint and observe the flaky GUI, we then disable the breakpoint (DR7=0) the GUI starts behaving normally again and raising the file dialog does not cause a crash.

We have replaced our breakpoint setting code with other example breakpoint setting code and each example has the same problem.

+1  A: 

Has anyone got hardware breakpoints to work on 64bit XP and if so how?

I guess that's a no then!

You can create a simple MFC application in Visual Studio and set a hardware breakpoint, e.g. a data breakpoint, in the debugger and the application will demonstrate the same behaviour as you're describing.

XP x64 does seem to be messed up sometimes when compared with the Vista/7 codebase. Therefore, it probably comes as no surprise that Microsoft aren't supporting XP x64 at all for some of its newer products, including Office 2010.

Nick
+1  A: 

There is an interesting project on Codeproject : "Toggle hardware data/read/execute breakpoints programmatically"

crawler
Thanks. I can't recall if we tried that code or not when we were looking for a solution, we did try 6 or more variations of HWB setting. The problem was that things went titsup with MFC applications and there were a few other reports of the problem on the web too.
lilburne