[PATCH 1/4 v8] gdb: Buffer output streams during events that might download debuginfo

Aaron Merey amerey@redhat.com
Fri Jan 19 19:52:30 GMT 2024


Hi Tom,

On Fri, Jan 19, 2024 at 2:33 PM Tom de Vries <tdevries@suse.de> wrote:
>
> what you're describing here sounds like exception slicing.
>
> The easiest way to fix this is by rethrowing using "throw" without argument.
>
> See this ( https://en.cppreference.com/w/cpp/language/throw ):
> ...
> When rethrowing exceptions, the second form must be used to avoid object
> slicing in the (typical) case where exception objects use inheritance: ...

Gotcha, thanks for clarifying. I wasn't aware of the second form of throw.

Aaron



More information about the Gdb-patches mailing list