File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ usage() {
88 echo " $0 -r <release> | <vmlinux> [<base path>|auto] [<modules path>]"
99}
1010
11+ # Try to find a Rust demangler
12+ if type llvm-cxxfilt > /dev/null 2>&1 ; then
13+ cppfilt=llvm-cxxfilt
14+ elif type c++filt > /dev/null 2>&1 ; then
15+ cppfilt=c++filt
16+ cppfilt_opts=-i
17+ fi
18+
1119if [[ $1 == " -r" ]] ; then
1220 vmlinux=" "
1321 basepath=" auto"
@@ -169,6 +177,12 @@ parse_symbol() {
169177 # In the case of inlines, move everything to same line
170178 code=${code// $' \n ' / ' ' }
171179
180+ # Demangle if the name looks like a Rust symbol and if
181+ # we got a Rust demangler
182+ if [[ $name =~ ^_R && $cppfilt != " " ]] ; then
183+ name=$( " $cppfilt " " $cppfilt_opts " " $name " )
184+ fi
185+
172186 # Replace old address with pretty line numbers
173187 symbol=" $segment$name ($code )"
174188}
You can’t perform that action at this time.
0 commit comments