From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Elizabeth Chastain To: chastain@cygnus.com, msnyder@cygnus.com Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] testsuite/gdb.c++/cplusfuncs.{exp,cc}: work with either g++ demangler Date: Mon, 12 Feb 2001 12:30:00 -0000 Message-id: <200102122030.MAA22848@bosch.cygnus.com> X-SW-Source: 2001-02/msg00176.html 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