Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost] Checking interest in stacktrace library
From: Ernest Zaslavsky (ernest.zaslavsky_at_[hidden])
Date: 2016-06-22 03:42:47

Yes, sure, /EHa
And you are right, it not a must to enable it, but if you want to handle structured exceptions on Windows instead of terminating the process you have to enable it, AFAIR.

-----Original Message-----
From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Gavin Lambert
Sent: Wednesday, June 22, 2016 10:06 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [boost] Checking interest in stacktrace library

On 21/06/2016 21:07, Ernest Zaslavsky wrote:
> Not sure I got you right. Do you mean catching exception somewhere top
> level and then showing stack of the original throw point? Isnt it
> stored (sorry, it was a long time ago) in EXCEPTION_POINTERS' member
> ContextRecord? AFAIR, if you use __try and __except and pass
> expression to __except with GetExceptionInformation() you are good to
> extract the original location of the exception (apparently unhandled)
> be it C++ or structured exception.

Yes, that's true. I had another look and the esoteric part that I was remembering was extracting the exception message from within the same SEH handler. Getting the stack trace is relatively trivial.

> Again, AFAIR, the only compiler option you have to set is /SEH

I assume you mean /EHa. That's not actually required IIRC (and using it sometimes sparks religious debates) but it does let you catch and unwind more exception types than /EHs does, which is sometimes handy, albeit with a performance cost.

Also /Oy- helps with getting stack traces in general (GCC equivalent is -fno-omit-frame-pointer).

Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at