* Preprocessor Support von Mangling / Demangling of C++ Identifiers - Any Ideas?
@ 2006-12-06 16:40 Daniel Lohmann
0 siblings, 0 replies; only message in thread
From: Daniel Lohmann @ 2006-12-06 16:40 UTC (permalink / raw)
To: gcc-help
Hi all,
In my project, I have many interactions between C++, C and assembler
code, symbol alias definitions in linker scripts etc.
The problem is that I very often have to refer to symbols emitted for
C++ entities from outside C++ source files. This means that the mangled
representation of C++ identifiers has to be used, which is quite painful:
; irq.S
__ciao_irq4:
; invoke hw::irq::ASC1_TBUF::HWHandler()
call _ZN2hw3irq9ASC1_TBUF9HWHandlerEv
rfe
I am looking for a preprocessor that provides means to mangle/demangle
C++ identifiers by some "magic macros":
; irq.S
__ciao_irq4:
; invoke hw::irq::ASC1_TBUF::HWHandler()
call MANGLE("hw::irq::ASC1_TBUF::HWHandler()")
rfe
Here, the preprocessor should replace MANGLE("<C++ identifier>") by
<mangled representation of C++ identifer>.
In the ideal case, this would be integrated into a real CPP. Well, I am
dreaming. But maybe anybody knows of any kind of preprocessor that
provides this kind of functionality?
(Yes, I am aware of c++filt, which however works only in one direction
(mangled->demangled) and does not provide any means to explicitly
destinct elements it should process from those it shouldn't)
Thanks a lot!
Daniel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-06 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-06 16:40 Preprocessor Support von Mangling / Demangling of C++ Identifiers - Any Ideas? Daniel Lohmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).