Messages in this thread | | | Date | Thu, 12 Feb 2015 12:27:04 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH 1/4] perf tools: add Java demangling support |
| |
On Wed, Feb 11, 2015 at 12:42:42AM +0100, Stephane Eranian wrote: > Add Java function descriptor demangling support. > Something bfd cannot do. >
SNIP
> + } > + buf[rlen] = '\0'; > + return buf; > +error: > + return NULL; > +} > + > +/* > + * Demangle Java function signature (Hotspot, not GCJ) > + * input: > + * str: string to parse. String is not modified > + * return: > + * if can demangle then a a newly allocate string is returned. > + * if cannot demangle, then NULL is returned > + * > + * Note that caller is responsible for freeing demangled string > + */ > +char * > +java_demangle_sym(const char *str) > +{
This seem fairly separated functionality, could you please move it into new object?
Also could you please document in more details requested input and produced output strings of this function?
It's nice function to have automated test that translates strings and verify expected output. IMO it'd help documenting the function as well.
thanks, jirka
| |