aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-04-29 20:35:34 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-04-29 20:35:34 -0400
commitcb02ab2416c2d83ca053652a21788189f3f7779f (patch)
tree1dd05e8c9c61d1fa44d693d2f159462a22f4b5cb /gdb
parenta6fc5ffc502238fcc5bce98868f4f353cc5d47d1 (diff)
downloadgdb-cb02ab2416c2d83ca053652a21788189f3f7779f.zip
gdb-cb02ab2416c2d83ca053652a21788189f3f7779f.tar.gz
gdb-cb02ab2416c2d83ca053652a21788189f3f7779f.tar.bz2
gdb: fix shellcheck warnings SC2006 (use $() instead of ``) in gdbarch.sh
Fix all instances of: In gdbarch.sh line 2195: printf " `echo "$function" | sed -e 's/./ /g'` %s %s)\n" "$returntype" "$function" ^-- SC2006: Use $(...) notation instead of legacy backticked `...`. Did you mean: printf " $(echo "$function" | sed -e 's/./ /g') %s %s)\n" "$returntype" "$function" See here [1] for the rationale. [1] https://github.com/koalaman/shellcheck/wiki/SC2006 gdb/ChangeLog: * gdbarch.sh: Use $(...) instead of `...`.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rwxr-xr-xgdb/gdbarch.sh6
2 files changed, 7 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index eefeac4..d751c05 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2020-04-29 Simon Marchi <simon.marchi@efficios.com>
+ * gdbarch.sh: Use $(...) instead of `...`.
+
+2020-04-29 Simon Marchi <simon.marchi@efficios.com>
+
* gdbarch.sh: Use double quotes around variables.
2020-04-29 Simon Marchi <simon.marchi@efficios.com>
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index a934a7a..0e89bd1 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -67,7 +67,7 @@ ${line}"
# The semantics of IFS varies between different SH's. Some
# treat ``;;' as three fields while some treat it as just two.
# Work around this by eliminating ``;;'' ....
- line="`echo "${line}" | sed -e 's/;;/; ;/g' -e 's/;;/; ;/g'`"
+ line="$(echo "${line}" | sed -e 's/;;/; ;/g' -e 's/;;/; ;/g')"
OFS="${IFS}" ; IFS="[;]"
eval read "${read}" <<EOF
@@ -2162,7 +2162,7 @@ do
printf "\n"
printf "void\n"
printf "set_gdbarch_%s (struct gdbarch *gdbarch,\n" "$function"
- printf " `echo "$function" | sed -e 's/./ /g'` gdbarch_%s_ftype %s)\n" "$function" "$function"
+ printf " %s gdbarch_%s_ftype %s)\n" "$(echo "$function" | sed -e 's/./ /g')" "$function" "$function"
printf "{\n"
printf " gdbarch->%s = %s;\n" "$function" "$function"
printf "}\n"
@@ -2192,7 +2192,7 @@ do
printf "\n"
printf "void\n"
printf "set_gdbarch_%s (struct gdbarch *gdbarch,\n" "$function"
- printf " `echo "$function" | sed -e 's/./ /g'` %s %s)\n" "$returntype" "$function"
+ printf " %s %s %s)\n" "$(echo "$function" | sed -e 's/./ /g')" "$returntype" "$function"
printf "{\n"
printf " gdbarch->%s = %s;\n" "$function" "$function"
printf "}\n"