In /usr/bin/gdb-add-index line 54:
    dwz_file=$(echo $dwz_file)
             ^---------------^ SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
                    ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    dwz_file=$(echo "$dwz_file")


In /usr/bin/gdb-add-index line 63:
    local file="$1"
    ^--------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/gdb-add-index line 81:
rm -f $tmp_files
      ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
rm -f "$tmp_files"


In /usr/bin/gdb-add-index line 84:
trap "rm -f $tmp_files" 0
            ^--------^ SC2064: Use single quotes, otherwise this expands now rather than when signalled.


In /usr/bin/gdb-add-index line 102:
    local file
    ^--------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/gdb-add-index line 122:
		 /dev/null 2>$debugstrerr; then
                             ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		 /dev/null 2>"$debugstrerr"; then


In /usr/bin/gdb-add-index line 123:
		cat >&2 $debugstrerr
                        ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		cat >&2 "$debugstrerr"


In /usr/bin/gdb-add-index line 127:
		    $debugstrerr; then
                    ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		    "$debugstrerr"; then


In /usr/bin/gdb-add-index line 131:
		cat >&2 $debugstrerr
                        ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		cat >&2 "$debugstrerr"


In /usr/bin/gdb-add-index line 138:
		 $(if $debugstradd; then \
                 ^-- SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, 'local' is undefined.
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2064 -- Use single quotes, otherwise this...