show_unreachable.sh: change the line number format
[smatch.git] / smatch_data / db / smdb_function_info.sh
blob093777dd7835dc9192f6f6f9a9990f78538589e4
1 #!/bin/bash
3 usage()
5 echo "Usage $0 <function>"
6 exit 1
9 get_function_pointers()
11 local func=$1
13 OLD_IFS=$IFS
14 IFS="
16 ptrs=$(echo "select distinct ptr from function_ptr where function = '$func';" | sqlite3 smatch_db.sqlite)
17 for ptr in $ptrs ; do
18 echo "select * from caller_info where function = '$ptr';" | sqlite3 smatch_db.sqlite
19 done
20 IFS=$OLD_IFS
23 func=$1
25 if [ "$func" = "" ] ; then
26 usage
29 echo "select * from caller_info where function = '$func';" | sqlite3 smatch_db.sqlite
30 get_function_pointers $func