This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 15/22] Make exceptions use std::string and be self-managing
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 3 Apr 2019 19:28:47 +0100
- Subject: Re: [PATCH v2 15/22] Make exceptions use std::string and be self-managing
- References: <20190227201849.32210-1-tom@tromey.com> <20190227201849.32210-16-tom@tromey.com> <f6f7893d-d3dc-6b68-adb8-88c710da19ca@redhat.com> <8736mz2cp4.fsf@tromey.com>
On 04/03/2019 06:58 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> I think fixing this isn't hard, so I think we should do it from the
> Pedro> start -- instead of gdb_exception holding a std::string, hold a
> Pedro> reference counted immutable heap-allocated C string.
>
> I'll do this.
>
> How about just a std::shared_ptr<std::string>?
That should be fine.
Thanks,
Pedro Alves