This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] libiberty: Initialize d_printing in all cplus_demangle_* functions.
- From: Pedro Alves <palves at redhat dot com>
- To: Mark Wielaard <mark at klomp dot org>, Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Nathan Sidwell <nathan at acm dot org>, Ian Lance Taylor <iant at google dot com>, Nick Clifton <nickc at redhat dot com>
- Date: Mon, 13 Mar 2017 18:54:19 +0000
- Subject: Re: [PATCH] libiberty: Initialize d_printing in all cplus_demangle_* functions.
- Authentication-results: sourceware.org; auth=none
- References: <1489356354-27648-1-git-send-email-mark@klomp.org> <20170313181150.GA287@x4> <20170313182959.GC2167@stream>
On 03/13/2017 06:29 PM, Mark Wielaard wrote:
> O, sorry. I should have let Nick known about the gdb regressions I found.
> Besides this patch gdb needs the following one-liner fix:
>
> diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y
> index fd1e949..5278c05 100644
> --- a/gdb/cp-name-parser.y
> +++ b/gdb/cp-name-parser.y
> @@ -201,6 +201,7 @@ make_empty (enum demangle_component_type d_type)
> {
> struct demangle_component *ret = d_grab ();
> ret->type = d_type;
> + ret->d_printing = 0;
> return ret;
> }
Should gdb be memsetting instead to avoid having to know about
libiberty's "internals"? Either version is pre-approved for GDB.
Thanks,
Pedro Alves