This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] testsuite/gdb.c++/cplusfuncs.{exp,cc}: work with either g++ demangler
- To: chastain at cygnus dot com, msnyder at cygnus dot com
- Subject: Re: [RFA] testsuite/gdb.c++/cplusfuncs.{exp,cc}: work with either g++ demangler
- From: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Date: Mon, 12 Feb 2001 12:30:44 -0800
- Cc: gdb-patches at sources dot redhat dot com
Hi Michael,
> I'm curious why you didn't simply write separate regular expressions,
> one to recognize the new demangler style and one to recognize the old,
> rather than add all this new mechanics.
That's a reasonable question.
The script does not actually know about about "v2 demangler" and "v3
demangler" and which regexp's go with which version. I wrote it more
like autoconf (although I am not experienced with autoconf). It probes
for each type separately and accommodates all the versions that I
have ever seen. If tomorrow's demangler wants to print 'foo &',
or report every 'int' as a 'signed int', it would be easy to maintain
the script.
> I'm concerned about the tcl scripts becoming complicated and difficult
> to maintain.
There are two parts. The probing part is meant to be independent and
can be copied-and-pasted into other scripts or put into a library.
The probing part can also be reduced to nothing if we stopped supporting
v2 abi. The strings are initialized to their v3 values.
As far as the use goes -- it does bother me to fill up the whole script
with "$dm_type_foo_ref".
Part of the problem is that a lot of these test scripts are not very
careful about "input to gdb" (which must always be a literal string)
versus "output from gdb" (which they can model with either a literal
string or with a regular expression). cplusfuncs.exp likes to specify
one string for both input and output, so it *has* to be a literal.
Michael