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] Anonymous namespaces and linespecs


Hi,

This is actually a patch for symtab/12704, reported by Jan:

(gdb) b 'FOO::(anonymous namespace)::BAR()'
Junk at end of arguments.


This is happening because along with the physname patch, there was also alot of mucking around with decode_line_1 and decode_compound. This is fallout from that. [Remember: we used to push almost everything through decode_variable -- in which the quoting is /required/.]


If we see "(anonymous namespace)", we must keep it as a significant part of the name. On the upside, we now no longer have to quote this stuff, either.

This patch also contains one cleanup. The string "(anonymous namespace)" was beginning to proliferate throughout the sources. I've added a macro to cp-support.h to define this string and changed all the places it had been hard-coded.

Tested on the buildbot.

Keith

ChangeLog

2010-05-18 Keith Seitz <keiths@redhat.com>

	PR symtab/12704
	* cp-namespace.c (ANONYMOUS_NAMESPACE_LEN): Remove.
	(cp_scan_for_anonymous_namespaces): Use CP_ANONYMOUS_NAMESPACE_STR
	and CP_ANONYMOUS_NAMESPACE_LEN.
	(cp_is_anonymous): Likewise.
	* cp_support.h (CP_ANONYMOUS_NAMESPACE_STR): Define.
	(CP_ANONYMOUS_NAMESPACE_LEN): Define.
	* dwarf2read.c (namespace_name): Likewise.
	(fixup_partial_die): Likewise.
	* linespec.c (decode_compound): If CP_ANONYMOUS_NAMESPACE_STR is
	seen in the input, keep it.

testsuite/ChangeLog

2010-05-18 Keith Seitz <keiths@redhat.com>

	PR symtab/12704
	* gdb.cp/anon-ns.cc: New file.
	* gdb.cp/anon-ns.exp: New file.

Attachment: 12704.patch
Description: Text document


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