kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: thayumker@gmail.com (Thayumanavar S)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Seeing symbols of modules in kgdb setup
Date: Wed, 11 May 2011 07:49:24 +0530	[thread overview]
Message-ID: <BANLkTimFPHwgAarj1dMDVTci9Be8XSAVGA@mail.gmail.com> (raw)
In-Reply-To: <20110510200019.GH5513@trikaliotis.net>

> I think the tutorial on Linsyssoft helped me a lot (but only after
> combining it with other resources): http://kgdb.linsyssoft.com/quickstart.htm.
>
> I have built a custom kernel with kgdb. kgdboc and kgdbwait are set up,
> I can break into my machine over serial. I can single step through the
> kernel, as long as no modules are involved.
>
> As soon as I have a module, I do not see its symbols or source anymore.
> http://kgdb.linsyssoft.com/downloads.htm mentions a modified "gdbmod",
> which has additional functionality to allow this.
You can use add-symbol-file to add symbol information to your modules.
Say as an example,
add-symbol-file /home/myhome/mymod.ko <text-address> -s .data
<data-address> -s .bss <bss-address>.
You can get the text-address, data-address, bss-address of the module
where it is loaded ( after loading the module) via:
cat /sys/module/mymod/sections/.text
cat /sys/module/mymod/sections/.data
cat /sys/module/mymod/sections/.bss
Recent kernel versions contain kgdb as part of the mainline kernel and
no need to apply any kernel patches if you use this kernel.

Thanks,
Thayumanavar S.

  reply	other threads:[~2011-05-11  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 20:00 Seeing symbols of modules in kgdb setup Spiro Trikaliotis
2011-05-11  2:19 ` Thayumanavar S [this message]
2011-05-11 18:21   ` Spiro Trikaliotis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimFPHwgAarj1dMDVTci9Be8XSAVGA@mail.gmail.com \
    --to=thayumker@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).