I have an Linux embedded device that I want to debug the cfg80211.ko

I have full root SSH on that device.

How can I debug cfg80211.ko?

  • Seeing as this is an embedded device you can't debug through a VM, so this needs local debugging. A couple of questions... do you have symbols for the running kernel, and can you install packages on this device? Jul 6, 2022 at 0:53
  • What do you mean install a packages into device? I can run gdbserver etc. That Linux Arm embedded @MegaTonnage
    – Kokomelom
    Jul 6, 2022 at 5:40
  • Added as an answer, however I haven't tested this recently and some of it likely won't be relevant to your embedded device. Jul 6, 2022 at 6:05

1 Answer 1


Adding my notes for Fedora here, maybe they'll help:

# ensure kernel core is configured
grep KCORE /boot/config-$(uname -r)

# install kernel debuginfo for symbols
dnf debuginfo-install kernel-core-$(uname -r)

# debug kernel using core file
gdb /boot/vmlinuz-$(uname -r) /proc/kcore

# find address
sudo cat /sys/module/<module>/sections/.text

# extract module if required
cp /usr/lib/modules/$(uname -r)/kernel/drivers/<module>/host/<module>.ko.xz ./
xz -d <module>.ko.xz

# load mod symbols
add-symbol-file /root/<module>.ko <address>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.