* Seeing symbols of modules in kgdb setup
@ 2011-05-10 20:00 Spiro Trikaliotis
2011-05-11 2:19 ` Thayumanavar S
0 siblings, 1 reply; 3+ messages in thread
From: Spiro Trikaliotis @ 2011-05-10 20:00 UTC (permalink / raw)
To: kernelnewbies
Hello,
I have a question on setting up kgdb. I searched the web and found some
tutorials. Unfortunately, it seems many are out of date, especially
taking into account that kgdb has been (partially?) integrated into the
main kernel. For example, I had to find out that the parameter for kgdb
are not called kgdb8250 anymore, but kgdboc.
The fact that the tutorials do not mention the version they refer to
does not help much, either.
Now, to my problem:
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.
Unfortunately, the patch and the gdbmod version given there are rather
outdated (gdb 6.4), while my Debian system has a much newer one: 7.0.1.
I do not know how to apply the patches, they do not. I have not found
any information if the patch (or something similar) has been included
into the main gdb.
So, what do I have to do in order to get kgdb with modules to run? Any
help is appreciated, and if its just a "RTFM" (as long as you tell me
WHICH manual, that is ;))
Any help is appreciated. Thanks for your time.
Best regards
Spiro.
--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Seeing symbols of modules in kgdb setup
2011-05-10 20:00 Seeing symbols of modules in kgdb setup Spiro Trikaliotis
@ 2011-05-11 2:19 ` Thayumanavar S
2011-05-11 18:21 ` Spiro Trikaliotis
0 siblings, 1 reply; 3+ messages in thread
From: Thayumanavar S @ 2011-05-11 2:19 UTC (permalink / raw)
To: kernelnewbies
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Seeing symbols of modules in kgdb setup
2011-05-11 2:19 ` Thayumanavar S
@ 2011-05-11 18:21 ` Spiro Trikaliotis
0 siblings, 0 replies; 3+ messages in thread
From: Spiro Trikaliotis @ 2011-05-11 18:21 UTC (permalink / raw)
To: kernelnewbies
Hello Thayumanavar,
* On Wed, May 11, 2011 at 07:49:24AM +0530 Thayumanavar S wrote:
> 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>.
[... snipp ...]
Thank you, that was exactly the info I needed. Somehow, it lay all the
time in front of my head, but I did not see it.
Thanks
Spiro.
--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-11 18:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 20:00 Seeing symbols of modules in kgdb setup Spiro Trikaliotis
2011-05-11 2:19 ` Thayumanavar S
2011-05-11 18:21 ` Spiro Trikaliotis
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).