diomidisspinellis:cscout

This is an old revision of the document!


CScout on FreeBSD

This page is open for contributing ideas, bugs, tips, and wishes regarding the application of the [http://www.spinellis.gr/cscout CScout] refactoring browser on the FreeBSD source code.

TableOfContents(2)

  • Track global variable assignments. Use this feature to verify the errno values listed in the section 2 of the manual against the implementation of the actual system calls.
  • Identifiers appearing on function prototypes are listed as unused. This creates noise in the corresponding query.
  • Process the userland code
  • Create the toolchain for all Tier-1 architectures
for a in amd64 i386 sparc64
do
        export MAKEOBJDIRPREFIX=/home/dds/src/fbsd-head/obj/$a
        make buildworld TARGET_ARCH=$a  2>make.world.$a.err >make.world.$a.out
done
  • Modify Makefile.inc1
sed -ie '/^TMPPATH/s/.*/TMPPATH=	${CSCOUT_SPY_TMPDIR}:${STRICTTMPPATH}:${PATH}/' Makefile.inc1

* Buld the kernel

for a in amd64 i386 sparc64
do
        (
                cd sys/$a/conf/
                make LINT
                # To avoid ../../../gnu/fs/xfs/xfs_bit.h:42:5:
                # "XFS_WANT_FUNCS" is not defined during compilation
                sed '/XFS/d' LINT >CSCOUT
                config CSCOUT
        )
        export MAKEOBJDIRPREFIX=/home/dds/src/fbsd-head/obj/$a
        spy-make buildkernel TARGET_ARCH=$a  KERNCONF=CSCOUT 2>make.kernel.$a.err >make.kernel.$a.out
        mv make.cs make.$a.cs
done
  • Merge the results
cat make.*.cs >all.cs
  • Run CScout
nice cscout all.cs
  • diomidisspinellis/cscout.1159800982.txt.gz
  • Last modified: 2006/10/02 14:56
  • by DiomidisSpinellis