This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Use unique_xmalloc_ptr for read_string


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> 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.

Simon> Hmm yeah I'm not too sure how Guile exceptions, work.  Would the
Simon> destructor of a an object local to gdbscm_value_to_string run, if
Simon> scm_from_stringn was to throw an exception, I guess that's the
Simon> question?

Yes - well, I think they would not be run, because guile exceptions are
longjmp based.

Also I think some replacement for
GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS that uses destructors will need
to be found.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]