This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use unique_xmalloc_ptr for read_string
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 18 Jun 2018 14:28:03 -0400
- Subject: Re: [RFA] Use unique_xmalloc_ptr for read_string
- References: <20180521204146.17553-1-tom@tromey.com>
On 2018-05-21 16:41, Tom Tromey wrote:
This changes read_string's "buffer" out-parameter to be a
unique_xmalloc_ptr, then updates the users. This allows for the
removal of some cleanups.
I chose unique_xmalloc_ptr rather than byte_vector here due to the way
Guile unwinding seems to work.
Hmm yeah I'm not too sure how Guile exceptions, work. Would the
destructor of a an object local to gdbscm_value_to_string run, if
scm_from_stringn was to throw an exception, I guess that's the question?
In any case, your patch LGTM.
Simon