Sponsored Content
Operating Systems Linux Red Hat How to setup kernel debugger in RHEL 6.0 Post 302530971 by Chrisdot on Wednesday 15th of June 2011 01:05:34 PM
Old 06-15-2011
How to setup kernel debugger in RHEL 6.0

Hi, I face up a terrible problem that is for me setting up kdb or any other kernel debugger.
Little background:
I am writing linux kernel driver in C and ASM on host (real) machine that is Linux RHEL 6.0.
I run (I mean debug using printk's) that driver on virtual machine: QEMU, RHEL 6.0 (v 2.6.32-71.el6.x86_64).
I need to watch and modify registers, stack, and memory (because of ASM code).

I found some tutorials, but no one is good for me, because everytime I cannot do some steps.
I have never compiled kernel and generally speaking I am linux beginner Smilie.

Could you help me with some steps?

___
for example this tutorial:
Inside the Linux kernel debugger
I successfully downloaded, unzpied two files (kdb-v4.4-2.6.33-common-1, kdb-v4.4-2.6.33-x86-1).
Unfortunately I even do not have folder /usr/src/linux ^_^.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

where to get Kernel debugger

hi , does anybody know about where to get kernel debugger for linux kernel version 2.6.11. I found it in oss.sgi.com.But there i have to download through ftp,which is not enabled here. So can anybody tell where can i get kdb(kernel debugger)through http. thanks in advance sriram (0 Replies)
Discussion started by: sriram.ec
0 Replies

2. UNIX for Advanced & Expert Users

Kernel debugger

hi, I want to have a debugger for my kernel and I am using kernel-2.6.11 n i am having patches kdb-v4.4-2.6.11-common-1.bz2 kdb-v4.4-2.6.11-i386-1.bz2. I applied both. I did make menuconfig with options CONFIG_KDB n CONFIG_FRAME_POINTER being set. when i tried to compile kernel. I got an... (0 Replies)
Discussion started by: sriram.ec
0 Replies

3. UNIX for Dummies Questions & Answers

Kernel panic - not syncing == While RHEL AS install

I am trying to Install RHEL AS 4 on x86 pc, through VNC and got the below error, Am not pretty sure as how to resolve this. Can some one guide me through the process, or what might be missing.... Have Installed RHEL, many a times but cudnt find this out... Wud appreciate an early reply ......... (0 Replies)
Discussion started by: Crazy_murli
0 Replies

4. UNIX for Advanced & Expert Users

compile a new kernel in RHEL 5

Hi all, I need some help in compiling a new kernel. I am using RHEL 5 with kernel version 2.6.18. I have downloaded a kernel from link http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.6.tar.bz2 1. cd /usr/src 2. wget -c http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 3.... (1 Reply)
Discussion started by: vikas027
1 Replies

5. Red Hat

RHEL AS 4 Kernel SRC + DKMS + QLogic

Hi, I need some help. I installed RHEL AS 4 u5 x86_64 (vendor requirement) on a Dell Blade 1855. I have a daughter board that will give it a HBA port. I can't install the daughter card until the Qlogic driver is loaded. I can't install the Qlogic driver sine the kernel src is not there. So I... (0 Replies)
Discussion started by: BFLO
0 Replies

6. Red Hat

Forcing a kernel panic in RHEL 5.4

Hello, Is there a way to force a kernel panic in RHEL 5.4 in such a way that the machine reboots after the panic. Thanks, Kanna (1 Reply)
Discussion started by: kanna_geekworkz
1 Replies

7. IP Networking

RHEL 5.0 IP Network setup

Can someone here please help and walk me through what I need to do to setup my network so that I can start an oracle listener ? I am connected through a router (netgear) and everytime I start my machine the ip address changes because of DHCP (I think). There are so many parameters that I do... (5 Replies)
Discussion started by: jxh461
5 Replies

8. Programming

Alternative debugger to GNU insight debugger

GNU insight debugger is not available now a days and it is required to debug/inspect assembly code as written in the book Assembly Language Programming step by step in Linux so my question is; is there any alternative to insight that I can use instead of insight in which I can get the same... (5 Replies)
Discussion started by: vectrum
5 Replies

9. Red Hat

Error throwing while installing vsftpd package in rhel 6. using rhel 6 dvd.

Hi all, Im studying rhcsa as of now, so yum installation and dependencies are messing me to not workit out. i have dual os, win 7 & rhel 6. i have tried this installation of vsftpd package with rhel 6 dvd in VM rhel 6 in win 7 as well as host rhel 6.still the same issue. below error... (6 Replies)
Discussion started by: redhatlbug
6 Replies

10. IP Networking

VPN setup in RHEL

Could someone tell me how to setup VPN for RHEL5 so that i can connect remotely from another location. (1 Reply)
Discussion started by: kartheekm56
1 Replies
DDB(8)							    BSD System Manager's Manual 						    DDB(8)

NAME
ddb -- configure DDB kernel debugger properties SYNOPSIS
ddb capture [-M -core] [-N -system] print ddb capture [-M -core] [-N -system] status ddb script scriptname ddb script scriptname=script ddb scripts ddb unscript scriptname ddb pathname DESCRIPTION
The ddb utility configures certain aspects of the ddb(4) kernel debugger from user space that are not configured at compile-time or easily via sysctl(8) MIB entries. To ease configuration, commands can be put in a file which is processed using ddb as shown in the last synopsis line. An absolute pathname must be used. The file will be read line by line and applied as arguments to the ddb utility. Whitespace at the beginning of lines will be ignored as will lines where the first non-whitespace character is '#'. OUTPUT CAPTURE
The ddb utility can be used to extract the contents of the ddb(4) output capture buffer of the current live kernel, or from the crash dump of a kernel on disk. The following debugger commands are available from the command line: capture [-M core] [-N system] print Print the current contents of the ddb(4) output capture buffer. capture [-M core] [-N system] status Print the current status of the ddb(4) output capture buffer. SCRIPTING
The ddb utility can be used to configure aspects of ddb(4) scripting from user space; scripting support is described in more detail in ddb(4). Each of the debugger commands is available from the command line: script scriptname Print the script named scriptname. script scriptname=script Define a script named scriptname. As many scripts contain characters interpreted in special ways by the shell, it is advisable to enclose script in quotes. scripts List currently defined scripts. unscript scriptname Delete the script named scriptname. EXIT STATUS
The ddb utility exits 0 on success, and >0 if an error occurs. EXAMPLES
The following example defines a script that will execute when the kernel debugger is entered as a result of a break signal: ddb script kdb.enter.break="show pcpu; bt" The following example will delete the script: ddb unscript kdb.enter.break For further examples, see the ddb(4) and textdump(4) manual pages. SEE ALSO
ddb(4), textdump(4), sysctl(8) HISTORY
The ddb utility first appeared in FreeBSD 7.1. AUTHORS
Robert N M Watson BUGS
Ideally, ddb would not exist, as all pertinent aspects of ddb(4) could be configured directly via sysctl(8). BSD
December 24, 2008 BSD
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy