0

I have some C++ code that crashes in a very confusing way in WinUsb. The crash is timing-dependent (i.e. if I slowly step through execution it doesn't happen), non-local (e.g. if I move one function call inside another function, it makes a third function crash) and when it crashes it more or less always corrupts the stack.

I'm also using MinGW which only outputs DWARF debugging info - not PDBs. So some tools (e.g. x64dbg) can't show debugging info.

Is there any possible way to debug this? On Linux I would use a reversible debugger like rr but there doesn't seem to be an equivalent for Windows. Does anyone know of any useful tools or techniques for this?

Community
  • 1
  • 1
Timmmm
  • 88,195
  • 71
  • 364
  • 509
  • In this particular case, the most likely cause is that the user-mode stack is being corrupted from kernel mode. So I don't think any user-mode debugging tool will be of much help. – Harry Johnston Apr 21 '17 at 22:39
  • You might be interested in Microsoft's pre-release [Time Travel Debugging](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview). Wouldn't have helped in this case because your problem involved interaction with the kernel, but FYI. – Harry Johnston Oct 04 '17 at 22:43

0 Answers0