This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Make class_name_from_physname part of language vector
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 16 Jun 2004 22:18:14 -0400
- Subject: Re: [RFA]: Make class_name_from_physname part of language vector
- References: <40A5583B.7030802@redhat.com>
On Fri, May 14, 2004 at 07:37:31PM -0400, Jeff Johnston wrote:
> Index: jv-lang.c
> + /* P now points at the `)' at the end of the argument list. Walk
> + back to the beginning. */
> + p--;
> + depth = 1;
> + while (p > name && depth > 0)
> + {
> + if (*p == '<' || *p == '(')
> + depth--;
> + else if (*p == '>' || *p == ')')
> + depth++;
> + p--;
> + }
> +
> + if (p == name)
> + return NULL;
> +
> + while (p > name && *p != '.')
> + p--;
You've left in a lot of hokery from the C++ support which I'm
reasonably confident Java does not need. I don't believe that Java
mangled names will ever have templates, or classes nested inside of
functions, or multiple argument lists - no depth at all. Also, I'd
appreciate it if you called it something other than
find_last_component; the C++ version shouldn't have such a generic name
either, IMO.
Otherwise this looks fine.
--
Daniel Jacobowitz