Example 11 Using cross-file analysis automatically during linking
-crossfile=auto
The default cross-file option is -crossfile=auto. The cross-file analysis occurs automatically when you invoke cadvise during linking.
$cadvise –pdb testpdb cc a.c b.c –c
$cadvise –pdb testpdb cc a.o b.o –o test.exe
Example 12 Delaying cross-file analysis till the specification of crossfile=pdb option
-crossfile=defer and -crossfile=pdb
If -crossfile=deferand -crossfile=pdbare used, cadvise delays the cross-file analysis till the specification of -crossfile=pdboption.
$cadvise –pdb testpdb cc a.c b.c –c
$cadvise –pdb testpdb –crossfile=defer cc a.o b.o –o test.exe $cadvise –pdb testpdb –crossfile=pdb
Example 13 Delaying cross-file analysis till the specification of crossfile=module option
-crossfile=defer and -crossfile=module
If -crossfile=deferand -crossfile=moduleare used, cadvise delays the cross-file analysis till the specification of -crossfile=moduleoption.
$cadvise –pdb testpdb cc a.c b.c –c
$cadvise –pdb testpdb –crossfile=defer cc a.o b.o –o test.exe $cadvise –pdb testpdb –crossfile=module:test.exe
Example 14 Delaying cross-file analysis till the specification of crossfile=list option
-crossfile=defer and -crossfile=list
If -crossfile=deferand -crossfile=listare used, cadvise delays the cross-file analysis till the specification of -crossfile=listoption.
$cadvise –pdb testpdb cc a.c b.c –c
$cadvise –pdb testpdb –crossfile=defer cc a.o b.o –o test.exe $cadvise –pdb testpdb –crossfile=list:a.o:b.o