public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [RFA] Use unique_xmalloc_ptr for read_string
Date: Mon, 18 Jun 2018 19:18:00 -0000	[thread overview]
Message-ID: <87in6fq52t.fsf@tromey.com> (raw)
In-Reply-To: <afae0a935a6c6313970adcddb31b62a5@polymtl.ca> (Simon Marchi's	message of "Mon, 18 Jun 2018 14:28:03 -0400")

>>>>> "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

      reply	other threads:[~2018-06-18 19:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 20:43 Tom Tromey
2018-06-18 14:44 ` Tom Tromey
2018-06-18 18:28 ` Simon Marchi
2018-06-18 19:18   ` Tom Tromey [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in6fq52t.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).