[Converted from Gnats 2494] catch catch - when the inferior enters an exception handler (in C++) "catch catch" returns control inside the __cxa_begin_catch code in libstdc++ library. catch throw - when the inferior throws an exception (in C++) "catch throw" returns control inside the __cxa_throw code in libstdc++ library. Both of these occur as the "catch catch" and "catch throw" operate by placing a breakpoint in __cxa_begin_catch and __cxa_throw libstdc++ functions respectively. While this is technically within "the code", it would be a better user experience to return control of the inferior at the line of the catch or throw, before it has executed the catch of throw. Release: unknown
I don't think there is a very good way to do this directly, but it could be faked by installing a frame filter that notices that the newest frame is __cxa_begin_catch and that the PC is where "catch catch" placed it. Then, the filter can simply elide the first frame. However, this would yield somewhat strange results. First, it isn't clear whether a frame filter can actually elide the first frame. Second, this would yield a situation where "bt" would report the selected frame as the user's code, but where the actual selected frame would be in libstdc++; so things like "info locals" would fail. I think that fixing this requires the next step of frame filters, namely integration with frame selection.
I no longer think it makes sense to try to do this. There's really no good way, and having a frame filter try to work around this is more likely to just confuse people than to help.