6 ms·
Under the hood of GCC specifically.
by zabzonk 5y ago
Under the hood of GCC specifically.
- cogman10 5y agoDoesn't GCC support multiple exception handling options?
- zabzonk 5y agoI'm not sure what your point is - mine was that the original post is specifically about GCC, not Standard C++.
- deleted 5y ago[deleted]
- cogman10 5y agoMainly that exception handling doesn't have a single solution, even in GCC. I'm agreeing with you that this article only highlights one version of exception handling for one compiler. There's also potential operating system involvement that's not really covered in this article.
- gumby 5y ago“Standard C++” just specifies `throw` and `catch` (plus what happens when you traverse a block, nothrow declaration etc) Every implementation has to do something to actually be standard C, and this is an example. It’s rather similar on other hardware, but as far as the standard goes that is irrelevant.
- mhh__ 5y agoI'm not sure exactly what you mean but there was a switch to DWARF EH ages ago (GCC 2?)
- account42 5y agosjlj is still supported, at least on some platforms, e.g. MinGW.
- arcatek 5y agoThat's the article I used when I implemented exceptions in an LLVM-based compiler, so it's applicable to more than just GCC.
- nicolasbrailo 5y agoIs your work public? If my article was useful, I'd love to have a look at what you did!
- arcatek 5y agoIt's public, but I doubt it still compiles against recent LLVM versions! I started it 8 years ago to get a better understanding how features like classes & operator overload would work in a JS-like language. It was really fun! https://github.com/castel/libcastel/blob/master/runtime/sources/runtime/interfaces/exceptions.cc#L36 https://github.com/castel/libcastel/blob/master/runtime/sour... https://github.com/castel/libcastel/blob/master/runtime/sources/runtime/helper/LSDA.cc https://github.com/castel/libcastel/blob/master/runtime/sour... I remember that at the time there were very few resources on personality functions, even in the LLVM doc - I had to make a lot of research before finding your articles, which were extremely helpful! I got reminded of them yesterday after someone pinged me on a Stack Overflow answer I made at the time, asking for an updated link; after I found your long-form article I figured it would be a good topic for HN as well :) https://stackoverflow.com/questions/16597350/what-is-an-exception-handling-personality-function https://stackoverflow.com/questions/16597350/what-is-an-exce...
- nicolasbrailo 5y agoahhh, I see you got hit by some of the fallout of my migration from Wordpress to Blogspot. Sorry about that! I tried to set http301s but gave up when I had to pay for it :)