Print this page
12166 resync smatch to 0.6.1-rc1-il-3
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/smatch_data/db/create_db.sh
+++ new/usr/src/tools/smatch/src/smatch_data/db/create_db.sh
1 1 #!/bin/bash
2 2
3 3 if echo $1 | grep -q '^-p' ; then
4 4 PROJ=$(echo $1 | cut -d = -f 2)
5 5 shift
6 6 fi
7 7
8 8 info_file=$1
9 9
10 10 if [[ "$info_file" = "" ]] ; then
11 11 echo "Usage: $0 -p=<project> <file with smatch messages>"
12 12 exit 1
13 13 fi
14 14
15 15 bin_dir=$(dirname $0)
16 16 db_file=smatch_db.sqlite.new
17 17
18 18 rm -f $db_file
19 19
20 20 for i in ${bin_dir}/*.schema ; do
21 21 cat $i | sqlite3 $db_file
22 22 done
23 23
24 24 ${bin_dir}/init_constraints.pl "$PROJ" $info_file $db_file
25 25 ${bin_dir}/init_constraints_required.pl "$PROJ" $info_file $db_file
26 26 ${bin_dir}/fill_db_sql.pl "$PROJ" $info_file $db_file
27 27 if [ -e ${info_file}.sql ] ; then
28 28 ${bin_dir}/fill_db_sql.pl "$PROJ" ${info_file}.sql $db_file
29 29 fi
30 30 ${bin_dir}/fill_db_caller_info.pl "$PROJ" $info_file $db_file
31 31 if [ -e ${info_file}.caller_info ] ; then
32 32 ${bin_dir}/fill_db_caller_info.pl "$PROJ" ${info_file}.caller_info $db_file
33 33 fi
34 34 ${bin_dir}/build_early_index.sh $db_file
35 35
36 36 ${bin_dir}/fill_db_type_value.pl "$PROJ" $info_file $db_file
37 37 ${bin_dir}/fill_db_type_size.pl "$PROJ" $info_file $db_file
38 38 ${bin_dir}/copy_required_constraints.pl "$PROJ" $info_file $db_file
39 39 ${bin_dir}/build_late_index.sh $db_file
40 40
41 41 ${bin_dir}/fixup_all.sh $db_file
42 42 if [ "$PROJ" != "" ] ; then
43 43 ${bin_dir}/fixup_${PROJ}.sh $db_file
44 44 fi
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
45 45
46 46 ${bin_dir}/copy_function_pointers.pl $db_file
47 47 ${bin_dir}/remove_mixed_up_pointer_params.pl $db_file
48 48 ${bin_dir}/delete_too_common_fn_ptr.sh $db_file
49 49 ${bin_dir}/mark_function_ptrs_searchable.pl $db_file
50 50
51 51 # delete duplicate entrees and speed things up
52 52 echo "delete from function_ptr where rowid not in (select min(rowid) from function_ptr group by file, function, ptr, searchable);" | sqlite3 $db_file
53 53
54 54 ${bin_dir}/apply_return_fixes.sh -p=${PROJ} $db_file
55 +${bin_dir}/insert_manual_states.pl ${PROJ} $db_file
55 56
56 57 mv $db_file smatch_db.sqlite
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX