smdb_param_buf_size.sh: ask db what size buffers are passed to a function
[smatch.git] / smatch_scripts / db / smdb_function_info.sh
blob3cd178bc7ef3f4b01b82beea7f31728528078650
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 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