This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 4/4] Change funcall_chain to be a std::vector
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 6 Sep 2017 20:39:47 +0100
- Subject: Re: [RFA 4/4] Change funcall_chain to be a std::vector
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C7223356D0
- References: <20170906051306.6092-1-tom@tromey.com> <20170906051306.6092-5-tom@tromey.com>
On 09/06/2017 06:13 AM, Tom Tromey wrote:
> This simplifies the handling of funcall_chain, by changing it to be a
> std::vector<int> and then fixing the users. This allows the removal
> of a cleanup.
>
> It would be even cleaner to replace this with better logic in the
> parsers; but a baby step seemed ok.
>
> Apparently the old code was leaking funcall_chain here. This is
> repaired now.
I guess it might be assuming that end_arglist was called on success.
>
> ChangeLog
> 2017-09-05 Tom Tromey <tom@tromey.com>
>
> * parse.c (funcall_chain): Now a std::vector.
> (start_arglist, end_arglist): Simplify.
> (free_funcalls): Remove.
> (parse_exp_in_context_1): Remove cleanup.
Looks good to me.
Thanks,
Pedro Alves