[RFA] Use unique_xmalloc_ptr for read_string
Simon Marchi
simon.marchi@polymtl.ca
Mon Jun 18 18:28:00 GMT 2018
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
More information about the Gdb-patches
mailing list