Generating map and list files
Assembler listing and map files are useful tools for debugging with the KDB kernel debugger.
To create the assembler list file during compilation, use the -qlist option. Also use the -qsource option to get the C source listing in the same file. To create the assembler list file with these options, type the following:
cc -c -DEBUG -D_KERNEL -DIBMR2 demokext.c -qsource -qlistIn order to obtain a map file, use the -bmap:FileName option for the link editor. The following example creates a map file named demokext.map:
ld -o demokext demokext.o -edemokext -bimport:/lib/syscalls.exp \
-bimport:/lib/kernex.exp -lcsys -bexport:demokext.exp -bmap:demokext.map