What do the hexadecimal numbers in the "first-chance exception ..." messages mean?

For example, in a message:

First chance exception in 0x757bd36f in foo.exe file: Microsoft C ++ Exception: _ASExceptionInfo in memory location 0x001278cc ..

What does 0x757bd36f and 0x001278cc mean? I think 0x757bd36f would mean EIP at the time of the exception, but what about the second number?

+7
source share
1 answer

As you might guess, the first is EIP when an exception occurred (or RIP, for the 64th code).

Performing some testing, the second number is the address of the exception object. However, keep in mind that this is not the same as the address of the created exception object. For example, I wrote the following bit of test code:

#include <iostream> #include <conio.h> class XXX { } xxx; void thrower() { throw xxx; } int main() { try { std::cout << "Address of xxx: " << (void *)&xxx << "\n"; thrower(); } catch(XXX const &x) { std::cout << "Address of x: " << (void *)&x << "\n"; } getch(); return 0; } 

At least in my testing, the second VS address in my "first chance exception" message matches the address that I get for x in the above code.

+2
source

All Articles