lkml.org 
[lkml]   [2012]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -tip/perf/core ] perf probe: Allow of casting an array of char to string
Date
Hi Hyeoncheol,

Please CC the perf maintainers - at least Arnaldo for perf tools - next time.

Thanks,
Namhyung


On Tue, 11 Sep 2012 17:00:54 +0900, Hyeoncheol Lee wrote:
> Before casting a type of a variable to string,
> convert_variable_type() confirms that the type is a pointer or
> an array. then if it is a pointer to char, it is casted to string.
> but in case of an array of char, it isn't
>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Signed-off-by: H.C. Lee <hyc.lee@gmail.com>
> ---
> tools/perf/util/probe-finder.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index d448984..94a00de 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -413,12 +413,12 @@ static int convert_variable_type(Dwarf_Die *vr_die,
> dwarf_diename(vr_die), dwarf_diename(&type));
> return -EINVAL;
> }
> + if (die_get_real_type(&type, &type) == NULL) {
> + pr_warning("Failed to get a type"
> + " information.\n");
> + return -ENOENT;
> + }
> if (ret == DW_TAG_pointer_type) {
> - if (die_get_real_type(&type, &type) == NULL) {
> - pr_warning("Failed to get a type"
> - " information.\n");
> - return -ENOENT;
> - }
> while (*ref_ptr)
> ref_ptr = &(*ref_ptr)->next;
> /* Add new reference with offset +0 */
> --
> 1.7.1


\
 
 \ /
  Last update: 2012-09-11 13:01    [W:0.050 / U:3.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site