lkml.org 
[lkml]   [2015]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-02-12 12:41    [W:0.198 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site