[RFA] Typedef'd method parameters [1/4]

Keith Seitz keiths@redhat.com
Thu Apr 21 21:16:00 GMT 2011


Hi,

As I mentioned in the preamble for this patchset, this patch changes 
cp-name-parser.y to not use shared memory. This is accomplished by 
changing the return type of cp_demangled_name_to_comp to return a 
pointer to a structure which contains the relevant storage bits. I have 
not bothered with storing the error messages: one error and the whole 
thing bows out anyway. Well, that and not a single caller actually ever 
uses it. [Future cleanup to remove *errmsg from cp-name-parser.y?]

This patch is largely mechanical. It does not cause any regressions to 
the test suite.

Comment/questions/concerns?

Keith

ChangeLog
2011-04-20  Keith Seitz  <keiths@redhat.com>

	* cp-name-parser.y (allocate_info): Change return type
	to struct demangle_info *.
	Always allocate a new demangle_info.
	(cp_demangled_name_parse_free): New function.
	(cp_demangled_name_to_comp): Change return type to
	struct demangle_parse_info *.
	Allocate a new storage for each call.
	(main): Update usage for cp_demangled_name_to_comp
	API change.
	* cp-support.h (struct demangle_parse_info): New structure.
	(cp_demangled_name_to_comp): Update API change for
	return type.
	(cp_demangled_name_parse_free): Declare.
	* cp-support.c (cp_canonicalize_string): Update API
	change for cp_demangled_name_to_comp.
	(mangled_name_to_comp): Likewise.
	Return struct demangle_parse_info, too.
	(cp_class_name_from_physname): Update mangled_name_to_comp
	API change.
	(method_name_from_physname): Likewise.
	(cp_func_name): Update API change for cp_demangled_name_to_comp.
	(cp_remove_params): Likewise.
	* python/py-type.c (typy_legacy_template_argument): Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cp_demangled_name_parse_free.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110421/4f4ba231/attachment.ksh>


More information about the Gdb-patches mailing list