This is the mail archive of the gdb@sources.redhat.com 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] |
cagney wrote:
[...]
> Could someone fix the old demangler, or write a new one in > plain C (or re-write the C++ one in C)? Pretty please?
Yes. There's no reason for the underlying demangler algorithm to be implemented in vanila ISO C 90, and then wrap it for the C++ side. [...]
You might be accused of dogmatic monolingualism if you don't accept the notion that some such code may be more naturally expressed in a higher level language -- that could be one such reason. Another reason of course is the fact that it is already done and working: rewriting costs new effort.
(Note that I'm not asserting that the former reason applies strongly here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to rely much on the C++ language's extra capabilities.)
--- Begin Message ---
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Andrew Cagney <cagney at redhat dot com>
- Cc: Mark Kettenis <kettenis at chello dot nl>, "H. J. Lu" <hjl at lucon dot org>,binutils at sources dot redhat dot com, GDB <gdb at sources dot redhat dot com>
- Date: 10 Jul 2003 18:58:28 -0400
- Subject: Re: FYI: A new C++ demangler
- References: <20030710143557.GA25588@lucon.org><86znjmp0c4.fsf@elgar.kettenis.dyndns.org><3F0DD802.6090201@redhat.com>
cagney wrote: > [...] > > Could someone fix the old demangler, or write a new one in > > plain C (or re-write the C++ one in C)? Pretty please? > > Yes. There's no reason for the underlying demangler algorithm to be > implemented in vanila ISO C 90, and then wrap it for the C++ side. > [...] You might be accused of dogmatic monolingualism if you don't accept the notion that some such code may be more naturally expressed in a higher level language -- that could be one such reason. Another reason of course is the fact that it is already done and working: rewriting costs new effort. (Note that I'm not asserting that the former reason applies strongly here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to rely much on the C++ language's extra capabilities.) - FChE
--- End Message ---
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |