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]

Re: Referencing C++ functions with non-demangled names.


"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


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