This is the mail archive of the
mailing list for the GDB project.
The perils of strcmp_iw
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb at sources dot redhat dot com
- Date: Sat, 8 Feb 2003 22:59:19 -0500
- Subject: The perils of strcmp_iw
/* Compute a hash code based using the same criteria as `strcmp_iw'. */
But actually it doesn't. strcmp_iw has the property of "foo == foo(arg)";
minsym_hash_iw has the stronger property of stops-at-first-left-parenthesis.
Suppose that we have something like "foo::operator()", or the horrific
"int foo<&(bar())>()" [yes, that's a real mangled name. No, I'm not
immediately sure why the return type is included. I suspect this drives our
current code absolutely wild.]
This is mostly a disgusted note to myself to clean up the comments; the hash
function is weaker than the equality test (terminology?), so we're OK. The
equality test has the potential for spurious matches but only if they have
unbalanced parens in them, so I'm not concerned right now. I just happened
to notice this while working on something else.
MontaVista Software Debian GNU/Linux Developer