I am trying to debug spi-xilinx.c using kgdb. The symbols for spi-xilinx.c are not in vmlinux.
I'm looking for symbols as follows:
$nm vmlinux | grep xilinx
$
I included CONFIG_SPI_XILINX in my kernel and built it per these instructions:
https://wiki.centos.org/HowTos/Custom_Kernel
Note that I am using RHEL 7 but the centos instructions worked well for me.
I verified that the module was in fact included in the kernel as follows:
$ grep xilinx /proc/kallsyms
ffffffff81487220 t xilinx_spi_setup
ffffffff81487230 t xilinx_spi_irq
ffffffff814872d0 t xilinx_spi_txrx_bufs
ffffffff814874b0 t xilinx_spi_setup_transfer
ffffffff81487520 t xilinx_spi_chipselect
ffffffff81487610 T xilinx_spi_deinit
ffffffff81487680 t xilinx_spi_remove
ffffffff814876b0 T xilinx_spi_init
ffffffff81487a60 t xilinx_spi_probe
ffffffff8174f3c0 r xilinx_spi_of_match
ffffffff819b5330 r __ksymtab_xilinx_spi_deinit
ffffffff819b5340 r __ksymtab_xilinx_spi_init
ffffffff819c9fc8 r __kcrctab_xilinx_spi_deinit
ffffffff819c9fd0 r __kcrctab_xilinx_spi_init
ffffffff819e8968 r __kstrtab_xilinx_spi_deinit
ffffffff819e897a r __kstrtab_xilinx_spi_init
ffffffff81addf80 d xilinx_spi_driver
ffffffff81babf1f t xilinx_spi_driver_init
ffffffff81cdb170 t __initcall_xilinx_spi_driver_init6
ffffffff81cffdf3 t xilinx_spi_driver_exit
I selected kernel config options as indicated in kernel doc for kgdb:
# CONFIG_DEBUG_RODATA is not set
CONFIG_FRAME_POINTER=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
I need the xilinx symbols in vmlinux so I can do source code level debug of spi-xilinx.c. What am I missing here? How do I get vmlinux to include spi-xilinx.c symbols?
Thank you for taking the time to help.