This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Attachment: cp_demangled_name_parse_free.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]