GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — scripts/decode_stacktrace.sh: guess path to vmlinux by release name · diffuzor2a9/BPI-Router-Linux@f90dde4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • scripts
    • decode_stacktrace.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎scripts/decode_stacktrace.sh‎

Copy file name to clipboardExpand all lines: scripts/decode_stacktrace.sh
+24-5Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,33 @@
55

66
if [[ $# < 1 ]]; then
77
echo "Usage:"
8-
echo " $0 <vmlinux> [base path] [modules path]"
8+
echo " $0 -r <release> | <vmlinux> [base path] [modules path]"
99
exit 1
1010
fi
1111

12-
vmlinux=$1
13-
basepath=${2-auto}
14-
modpath=$3
15-
release=""
12+
if [[ $1 == "-r" ]] ; then
13+
vmlinux=""
14+
basepath="auto"
15+
modpath=""
16+
release=$2
17+
18+
for fn in {,/usr/lib/debug}/boot/vmlinux-$release{,.debug} /lib/modules/$release{,/build}/vmlinux ; do
19+
if [ -e "$fn" ] ; then
20+
vmlinux=$fn
21+
break
22+
fi
23+
done
24+
25+
if [[ $vmlinux == "" ]] ; then
26+
echo "ERROR! vmlinux image for release $release is not found" >&2
27+
exit 2
28+
fi
29+
else
30+
vmlinux=$1
31+
basepath=${2-auto}
32+
modpath=$3
33+
release=""
34+
fi
1635

1736
declare -A cache
1837
declare -A modcache

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.