OpenWrt Forum Archive

Topic: Can't build kgdb on ar71xx architecture

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I set it in menuconfig "advanced configuration options"->"toolchain options"->"build gdb". However, no kgdb is built.

The configs to build it disappear in the .config for the kernel build.

$ grep -i gdb build_dir/*/linux*/.config*
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config:CONFIG_HAVE_ARCH_KGDB=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.old:CONFIG_HAVE_ARCH_KGDB=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.old:CONFIG_KGDB=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.old:CONFIG_KGDB_SERIAL_CONSOLE=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.old:# CONFIG_KGDB_TESTS is not set
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.target:CONFIG_HAVE_ARCH_KGDB=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.target:CONFIG_KGDB=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.target:CONFIG_KGDB_SERIAL_CONSOLE=y
build_dir/linux-ar71xx_generic/linux-2.6.32.27/.config.target:# CONFIG_KGDB_TESTS is not set

I saved the make log and tried each script that built .config and they all included the configs for kgdb and the kgdb serial console.

Using "make kernel_menuconfig" to set kgdb has no effect.

I'm using svn 25078.

I'm stumped.

Steve

(Last edited by sbrown on 23 Jan 2011, 23:40)

Turns out that you need “Global build settings”?“Compile the kernel with debug information” or no debugging info gets built. Trying to override it with kernel_menuconfig goes nowhere as the "# CONFIG_KERNEL_DEBUG_INFO is not set" added by the openwrt .config seems to have the last word. Things are more obvious in the morning.

Further, the gdb 6.8 that gets built by the toolchain doesn't correctly report symbols in mac80211.ko. All you get is "No line number information available for address xxxx". With other modules, like cfg80211.ko and ath9k.ko, it works fine. I downloaded gdb 7.2 and built a x86/mips version. It has no problem with mac80211.ko and get the correct line numbers.

Steve

The discussion might have continued from here.