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
WITNESS(4)						   BSD Kernel Interfaces Manual 						WITNESS(4)

NAME
witness -- lock validation facility SYNOPSIS
options WITNESS options WITNESS_KDB options WITNESS_SKIPSPIN DESCRIPTION
The witness module keeps track of the locks acquired and released by each thread. It also keeps track of the order in which locks are acquired with respect to each other. Each time a lock is acquired, witness uses these two lists to verify that a lock is not being acquired in the wrong order. If a lock order violation is detected, then a message is output to the kernel console detailing the locks involved and the locations in question. Witness can also be configured to drop into the kernel debugger when an order violation occurs. The witness code also checks various other conditions such as verifying that one does not recurse on a non-recursive lock. For sleep locks, witness verifies that a new process would not be switched to when a lock is released or a lock is blocked on during an acquire while any spin locks are held. If any of these checks fail, then the kernel will panic. The flag that controls whether or not the kernel debugger is entered when a lock order violation is detected can be set in a variety of ways. By default, the flag is off, but if the WITNESS_KDB kernel option is specified, then the flag will default to on. It can also be set from the loader(8) via the debug.witness.kdb environment variable or after the kernel has booted via the debug.witness.kdb sysctl. If the flag is set to zero, then the debugger will not be entered. If the flag is non-zero, then the debugger will be entered. The witness code can also be configured to skip all checks on spin mutexes. By default, this flag defaults to off, but it can be turned on by specifying the WITNESS_SKIPSPIN kernel option. The flag can also be set via the loader(8) environment variable debug.witness.skipspin. If the variable is set to a non-zero value, then spin mutexes are skipped. Once the kernel has booted, the status of this flag can be exam- ined but not set via the read-only sysctl debug.witness.skipspin. The sysctl debug.witness.watch specifies the level of witness involvement in the system. A value of 1 specifies that witness is enabled. A value of 0 specifies that witness is disabled, but that can be enabled again. This will maintain a small amount of overhead in the system. A value of -1 specifies that witness is disabled permanently and that cannot be enabled again. The sysctl debug.witness.watch can be set via loader(8). The witness code also provides two extra ddb(4) commands if both witness and ddb(4) are compiled into the kernel: show locks Outputs the list of locks held by the current thread to the kernel console along with the filename and line number at which each lock was last acquired by this thread. show witness Dump the current order list to the kernel console. The code first displays the lock order tree for all of the sleep locks. Then it displays the lock order tree for all of the spin locks. Finally, it displays a list of locks that have not yet been acquired. SEE ALSO
ddb(4), loader(8), sysctl(8), mutex(9) HISTORY
The witness code first appeared in BSD/OS 5.0 and was imported from there into FreeBSD 5.0. BUGS
The witness code currently does not handle recursion of shared sx(9) locks properly. BSD
February 18, 2001 BSD
All times are GMT -4. The time now is 09:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy