debugging loadable modules with simple "gdb"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  the second part of that earlier post.  again, following the theme
from LDD3, ch 4:

  http://lwn.net/Kernel/LDD3/

Q1:  if i'm just debugging the kernel, i can see the kernel ELF
section breakdown with:

  (gdb) info files

after i run "add-symbol-file" for a loaded module, is there a similar
command that will show me the change now that i've added those extra
symbols?  certainly, running "info files" doesn't give me any
different output.  what's the easiest way to verify the new "content"
that's been added to my current gdb session?  or do i just have to
*know* the symbols that are newly available?

Q2:  if i want to update my current symbol contents for kernel
symbols, i have to run:

  (gdb) core-file /proc/kcore

to reload.  i have to do exactly the same thing for module contents as
well, correct?  after all, once a module is loaded, it's all part of
/proc/kcore, yes?

Q3:  if i've loaded the symbol table for a module section, then
unloaded the module, what happens if i try to print one of its (now
removed) symbols?  i guess i could test that, and i'm assuming it
wouldn't be fatal, but i'd rather not test it only to have the system
crash.

rday

p.s.  i suspect i can see which symbols come and go by constantly
checking the contents of /proc/kallsyms.  i'm sure that would work.

--


========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
"Kernel Newbie Corner" column @ linux.com:          http://cli.gs/WG6WYX
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux