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?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityI 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?
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
<address>
# 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>