Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to use KGDB over serial in a 2.6.27.7-9 kernel for debugging a module. KGDB comes built-in with this kernel.
I want to debug a module. I have built the module with ‘-g3’ and ‘-O0’ options in the Makefile.
The kernel on the target machine was built on the development machine, with the source for the module in [kernel-source]/drivers/scsi/[module]/
I moved the vmlinuz, initrd, System.map and /lib/modules/[kernel-name] over to the target machine.
The target kernel boots, waits for GDB on the host side, and responds to ‘continue’ on the host side.
I am able to SysRq+g on the target to interrupt after the module of interest has been loaded. That returns control to GDB on the host.
At that point I am able to ‘add-symbol-file [path] [.text address]’ and the symbols load successfully.
I can then set a desired breakpoint using the symbols that I am interested in.
Then I hit continue on the development machine, and that lets the target continue booting.
Once the target completes booting, I run a test program that will trip that breakpoint by using that module.
It is at this point that the target locks up, as though the breakpoint has been tripped. However, the development machine does not return the GDB prompt to me. It just stays locked up with no prompt.
Do you have any idea what the problem is?
Thanks in advance.
P.S. I Think I am using GDBMOD 2.4 from Amit Kale's site. I built the GDBMOD source and did a make install and that placed a 'gdb' in '/usr/local/bin'. I don't think that was there before, seeing as I made sure to install gdb at the time SUSE was installed.
'set solib-search-path [driver ko path]' does nothing (info sharedlibraries).
Last edited by droneprime; 04-28-2009 at 11:19 AM.
Hi,
I am trying to use kgdb for 2.6.28.6 for ARM architecture.
kgdbwait does not seem to work for me?
Can you tell me what is the exact kernel command line parameter for the same to use kgdboc with kgdbwait (Hang with "Waiting for connection from remote gdb...")?
Do I need to apply any patch if I want to use kgdboe since I could not find any code related to kgdb over ethernet in kernel sources?
I have no idea about kgdboe. that seemed like another can of worms that i didn't want to open.
The following is the boot parameter string that I use. I haven't had the time to test and see if I have any redundant/unnecessary tags in there...
But yea, this line works for me.
I tried with "kgdboc=ttyS0,115200 kgdbwait" as boot option.
I also enabled kernel hacking->KGDB-kernel debugging with remote GDB->KGDB-use KGDB over serial console.
But still it didn't seem to work. Do I need to enable anything else...?
I will try "kgdb8250" option also.
I have no idea about what you would need to do for the ARM architecture...
It might just not work, I have not had much luck with KGDB at any point along the way.
ok
I will try it out....
What does N in 115200N stand for? Any idea?
Actually I am using ARM board and Minicom to connec to the board, I want to do some driver testing for the board.
Thanks for your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.