swtv-kaist / cs458-fall22

1 stars 0 forks source link

HW#6 gcov -b -f #19

Open UkhoShin opened 1 year ago

UkhoShin commented 1 year ago

gcov -b -f 커맨드 사용 시, ppt처럼 각 함수별로 branch coverage가 출력되지 않고 아래와 같이 따로 출력됩니다. 제대로 출력하려면 어떻게 해야 하나요.

$ gcov -b -f tcas-mod

Function 'main' Lines executed:22.22% of 36

Function 'alt_sep_test' Lines executed:0.00% of 16

Function 'Own_Above_Threat' Lines executed:0.00% of 2

Function 'Own_Below_Threat' Lines executed:0.00% of 2

Function 'Non_Crossing_Biased_Descend' Lines executed:0.00% of 6

Function 'Non_Crossing_Biased_Climb' Lines executed:0.00% of 6

Function 'Inhibit_Biased_Climb' Lines executed:0.00% of 2

Function 'ALIM' Lines executed:0.00% of 2

Function 'initialize' Lines executed:0.00% of 6

File 'tcas-mod.c' Lines executed:10.26% of 78 Branches executed:3.03% of 66 Taken at least once:1.52% of 66 Calls executed:15.79% of 38 Creating 'tcas-mod.c.gcov'

moonzoo commented 1 year ago

Q1. Did you compile tcas-mod.c w/ -coverage option? Q2. Do you use gcov on verifier machines? When I use gcov on verifier3, gcov shows branch coverage correctly.