Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Wei-min Pan <weimin.pan@oracle.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: CTF support
Date: Thu, 03 Oct 2019 18:01:00 -0000	[thread overview]
Message-ID: <75851ff5-771d-16fb-0a74-661c9e0722d3@simark.ca> (raw)
In-Reply-To: <c5d4d863-63f1-a469-e6d6-6dd757b71bde@oracle.com>

On 2019-10-03 1:58 p.m., Wei-min Pan wrote:
> But the `free` call is needed to free up space allocated by libctf's ctf_type_aname_raw.

That's the point of gdb::unique_xmalloc_pointer: it will automatically call xfree (free) when
on scope exit, free'ing this copy.  It's preferred to use this instead of manually calling
xfree, because it makes it harder to forget to free the memory (or to free it twice).

Simon


  reply	other threads:[~2019-10-03 18:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 23:45 Weimin Pan
2019-09-21 22:21 ` Simon Marchi
2019-09-23 21:11   ` Weimin Pan
2019-09-24  3:10     ` Simon Marchi
2019-09-25  0:22       ` Weimin Pan
2019-09-25  0:27         ` Simon Marchi
2019-09-25  2:04           ` Wei-min Pan
2019-09-25  2:35             ` Simon Marchi
2019-09-25 21:09               ` Wei-min Pan
2019-09-30  3:06 ` Simon Marchi
2019-10-01  0:37   ` Weimin Pan
2019-10-02  2:47     ` Simon Marchi
2019-10-02 23:10       ` Wei-min Pan
2019-10-03 12:40         ` Simon Marchi
2019-10-03 17:59           ` Wei-min Pan
2019-10-03 18:01             ` Simon Marchi [this message]
2019-10-03 18:21               ` Wei-min Pan
2019-10-03 18:31                 ` Simon Marchi
2019-10-03 18:53                   ` Wei-min Pan
2019-10-03 20:33                     ` Wei-min Pan

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=75851ff5-771d-16fb-0a74-661c9e0722d3@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=weimin.pan@oracle.com \
    /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