projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b878e7f
)
perf probe: Allow of casting an array of char to string
author
Hyeoncheol Lee
<
[email protected]
>
Tue, 11 Sep 2012 07:57:28 +0000
(16:57 +0900)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Thu, 24 Jan 2013 19:40:20 +0000
(16:40 -0300)
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
Signed-off-by: H.C. Lee <
[email protected]
>
Acked-by: Masami Hiramatsu <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Masami Hiramatsu <
[email protected]
>
Cc: Paul Mackerras <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Srikar Dronamraju <
[email protected]
>
Link:
http://lkml.kernel.org/r/CANFS6bb75e8a_UtyAD9yF73hfXDy0N8tSjDz=a+Vna=Y8ORMHg@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/util/probe-finder.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/probe-finder.c
b/tools/perf/util/probe-finder.c
index 1daf5c14e751bf954e5665e1caa179b191cbd361..be0329394d5639f77644d8a9079dd6ceb4f27a73 100644
(file)
--- 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 */