79445641

Date: 2025-02-17 14:13:10
Score: 1
Natty:
Report link

When you need to get the std::exception form an std::exception_ptr in a debug session on a core dump, changing the code is not an option.

For Windows, I found the following useful:

https://devblogs.microsoft.com/oldnewthing/20200820-00/?p=104097 (Inside the Microsoft STL: The std::exception_ptr) describes the members of std::exception_ptr on windows systems.

For debugging purposes, you can ignore the _Data2 and focus on the _Data1, which is a pointer to an EXCEPTION_RECORD.

https://devblogs.microsoft.com/oldnewthing/20100730-00/?p=13273 (Decoding the parameters of a thrown C++ exception (0xE06D7363)) describes that structure:

Parameter 1 is a pointer to the object being thrown (sort of).

On my dump, Parameter 2 did contain the address of the std::exception. I was able to view the exception in the debugger, read the what()-string and finally find the cause of that crash. :-)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Starts with a question (0.5): When you
  • Low reputation (0.5):
Posted by: Mario Klebsch