This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Referencing C++ functions with non-demangled names.
- To: dany_100 at yahoo dot com
- Subject: Re: Referencing C++ functions with non-demangled names.
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: 21 May 2001 21:23:36 -0400
- Cc: gdb at sourceware dot cygnus dot com
- References: <3B0987CD.7848.1387DF@localhost>
"Daniel Manfis" <dany_100@yahoo.com> writes:
> Hello.
>
> If i want to set breakpoint on a C++ function, how could i do it
> using it's usual and not mangled name? I tried to turn on
> "set print demangle" and "set print asm-demangle", but it doesn't
> help: whenever i try to put breakpoint on a C++ function (in my own
> code) with it's non-demangled name (like: 'break main.cc:f'), i get a
> message:
>
> 'function "f" not defined'
>
> and i have to either use mangled name or line number.
Errr, I need a test case, it works fine here.
I also need to know what compiler version, etc, you are using.
The workaround is to quote it, or remove the filename: from the front
(or both).
C++ functions with the same name must be the same function, by the
one definition rule, so prefixing it like that is pointless.
Regardless, even if the workaround works, some more information would
be helpful, since i can't reproduce this problem with any compilers i
have around here.
--Dan
--
"I saw a subliminal advertising executive, but only for a second.
"-Steven Wright