After further investigation, the necessary patch seems to have been sucked into the kernel in 2.6.8+. I'll post the script here:

#!/bin/bash
#
# gdbline module image
#
# Outputs an add-symbol-file line suitable for pasting into gdb to examine
# a loaded module.
#
cd /sys/module/$1/sections
echo -n add-symbol-file $2 `/bin/cat .text`

for section in .[a-z]* *; do
   if [ $section != ".text" ]; then
       echo  " \\"
       echo -n "   -s" $section `/bin/cat $section`
   fi
done
echo

Just add your host module path as the second argument, and you should be debugging modules in 2.6.
Allan
Blaisorblade wrote:

On Wednesday 06 July 2005 19:44, Allan Graves wrote:
I've seen lots of questions about debugging modules using gdb under
2.6.9+ kernels,
What's special about those kernels?
but very few answers, at least that I've found through use of sourceforge's search function. Is there a collection or an
updated HOWTO like the one on the uml sourceforge page on how to debug
loadable modules using gdb and uml running 2.6.9+ kernels?
Allan
About modules debugging, there's a solution to find module load address through sysfs, looking into /sys/module/; it's described at lwn.net (search "Module debugging").
begin:vcard
fn:Allan Graves
n:Graves;Allan
email;internet:[EMAIL PROTECTED]
tel;work:603-8973276
x-mozilla-html:FALSE
version:2.1
end:vcard

Reply via email to