This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdb/cp-name-parser.y: Eliminate make_empty, use cplus_demangle_fill_component
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 27 Mar 2017 11:29:25 -0400
- Subject: [binutils-gdb] gdb/cp-name-parser.y: Eliminate make_empty, use cplus_demangle_fill_component
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT a7e80b9e21eb907ac5c90de7452588c059db0cec ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: a7e80b9e21eb907ac5c90de7452588c059db0cec
gdb/cp-name-parser.y: Eliminate make_empty, use cplus_demangle_fill_component
The demangler exports the cplus_demangle_fill_component function that
clients should use to initialize demangle_component components that
use the "s_binary" union member. cp-name-parser.y uses it in some
places, via the fill_comp wrapper, but not all. Several places
instead use a GDB-specific "make_empty" function. Because this
function does not call any of the demangler "fill" functions, we had
to patch it recently to clear the allocated demangle_component's
"d_printing" field, which is supposedly a "private" demangler field.
To avoid such problems in the future, this commit switches those
places to use "fill_comp" instead, and eliminates the "make_empty"
function.
gdb/ChangeLog:
2017-03-27 Pedro Alves <palves@redhat.com>
* cp-name-parser.y (make_empty): Delete.
(demangler_special, nested_name, ptr_operator, array_indicator)
(direct_declarator, declarator_1): Use fill_comp instead of
make_empty.