0

I am debugging a crash in a .dmp file using Visual Studio 2019. I am able to figure out that the crash is caused by an integer division of zero within the function InvertMatrix which takes a IntMatrix struct pointer, but I would like to know what was in the matrix passed into the struct. The problem is since this is a mini dump I don't have the source code and I don't even know how the struct is arranged. I am pretty new to assembly and debugging .dmp files so I am unfamiliar with the steps I should take to be able to see this information or if I can get it at all. Any help or guidance would be greatly appreciated. This is the snapshot of the disassembly and the call stack. Snapshot of the crash in the .dmp file. Shows registers, disassembly, and call stack

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
  • Since you just posted a picture of the UI, not code in a code-formatting block, I guess you're asking about the general process, not for the specific code. Look for a loop that increments a pointer or index, and assuming that's looping over the matrix data, that should show you what register(s) are used to address it. From register values, you can then figure out where the matrix is and dump that memory. And if there was a pointer to it in a struct, you can see how that pointer was loaded from earlier, and (if there's still a pointer to it anywhere) look at what was nearby. – Peter Cordes Oct 11 '21 at 07:37
  • If that info isn't present in the crash dump, set a breakpoint earlier. Asm-level debugging of code you didn't write can be rough going beyond identifying the immediate cause of the crash, even if you're fluent in asm. Especially if you don't even have the source code it was compiled from. If you do have source, just not associated with this minidump, then use debug info to see how the asm matches up with the source. (e.g. use https://godbolt.org/ compiler explorer) – Peter Cordes Oct 11 '21 at 07:40

0 Answers0