This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: C++ mangling, function name to mangled name (or tree)


On Wed, Jul 6, 2011 at 18:00, Pierre Vittet <piervit@pvittet.com> wrote:

> I would like user of the plugin to give in arguments the name of the
> functions on which he would like a test to be run. That means that I must
> convert the string containing a function name (like "myclass::init") and get
> either the mangled name or the tree corresponding to the function. I know
> that there might be several results (functions with the same name and
> different arguments), a good policy for me would be to recover every
> concerned functions (at least for the moment).
>
> I guess what I want to do is possible, because there are already some tools
> doing it (like gdb).

Are you absolutely sure about gdb? It could be doing it the other way
around, i.e. start from the mangled names in the object file and
demangle all of them. Then it would search for a function name in its
list of demangled names.
Just guessing, though :)


Regards,

Kevin AndrÃ


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