From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Remove munmap_listp_free_cleanup
Date: Mon, 17 Sep 2018 10:58:00 -0000 [thread overview]
Message-ID: <9642b747-7f95-fe5d-4cf3-b0d623ec40ae@redhat.com> (raw)
In-Reply-To: <20180915222411.24764-2-tom@tromey.com>
On 09/15/2018 11:24 PM, Tom Tromey wrote:
> -static void
> -munmap_listp_free_cleanup (void *headp_voidp)
> +munmap_list::~munmap_list ()
> {
> - struct munmap_list **headp = (struct munmap_list **) headp_voidp;
> -
> - munmap_list_free (*headp);
> + for (auto &item : items)
> + gdbarch_infcall_munmap (target_gdbarch (), item.addr, item.size);
> }
I think we should wrap that in try/catch, because an infcall can be
aborted/throw, and we're in a destructor.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-09-17 10:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 22:24 [PATCH 0/2] remove the remaining cleanups from gdb/compile Tom Tromey
2018-09-15 22:24 ` [PATCH 1/2] Remove munmap_listp_free_cleanup Tom Tromey
2018-09-17 1:37 ` Simon Marchi
2018-09-17 6:23 ` Tom Tromey
2018-09-17 10:58 ` Pedro Alves [this message]
2018-09-17 21:21 ` Tom Tromey
2018-09-18 14:19 ` Pedro Alves
2018-09-15 22:24 ` [PATCH 2/2] Remove remaining cleanups from compile-object-load.c Tom Tromey
2018-09-17 1:39 ` Simon Marchi
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=9642b747-7f95-fe5d-4cf3-b0d623ec40ae@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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