On Mon, Aug 20, 2007 at 06:10:42PM +0100, Andrew STUBBS
wrote:
> Hi,
>
> I have encountered a problem setting breakpoints on
overloaded C++ functions:
> when I specify the function signature, I have to use
the canonical type name,
> not the typedef name used in the source I am looking
at. (I am aware it prompts
> where no signature is given, but that possibility is
not available to scripts,
> for example).
Check whether you are ending up with a search based on the
function's
symbol or minsym. The mangled name always uses the
canonical type
name (for obvious ABI reasons).
> The dwarf debug information, on the other hand, shows
the function with the
> typedef name used in the source code. It also contains
the proper mapping from
> typedef name to actual class name.
>
> Would it not be possible to use the debug information,
where available, to
> canonicalize the type names before attempting to match
the function signatures,
> at least for the purposes of setting breakpoints?
Yes, but it's a lot of work. We can not currently
canonicalize
anything during lookup because we do not canonicalize during
symbol
reading; and just turning that on slows things down
considerably. The
cp-names.y parser was intended for exactly this.
--
Daniel Jacobowitz
CodeSourcery
|