02-12-2012
You don't. kernel code runs in kernel mode where gdb and any other user-mode code debugger cannot get at it. It's just not the same.
The kernel has its own debugger, kdb, about which I unfortunately don't know much.
This User Gave Thanks to Corona688 For This Post:
9 More Discussions You Might Find Interesting
1. SuSE
I'm using SuSE 9.2 Pro and trying to use a program call BestCrypt. I get it installed and type bctool and it says "Kernel modules not loaded". If you need to know anymore about it you can find it at http://www.jetico.com/linux/bcrypt-help/index.htm
linux:/home/chris/Desktop/Xtheater-0.9.2 #... (6 Replies)
Discussion started by: CTroxtell21
6 Replies
2. HP-UX
Hi all,
what do kernel modules libaudit, klog and strlog do?
Specifically I want to determine if it was possible for us to determine if kernel level auditing is enabled at all?
regards (0 Replies)
Discussion started by: slash_blog
0 Replies
3. UNIX for Advanced & Expert Users
I installed in VM the Mandriva Linux with 2.6.27 kernel.
But presently when I fire make the modules .ko does not get built.
I get the following output on firing command in the kernel module folder.
$ make
Building first_driver.c ... make: Entering directory... (1 Reply)
Discussion started by: rupeshkp728
1 Replies
4. Emergency UNIX and Linux Support
Hi,
I need to set qlogic qla2xxx parameters in /etc/modprobe.conf
(Oracle Linux Server release 5.7, almost equal to RedHat 5.7)
two questions:
how can I pass this parameters to the module while it is loaded (fibre channel luns are in use), if possible at all
and how can I check the... (3 Replies)
Discussion started by: funksen
3 Replies
5. UNIX for Dummies Questions & Answers
This query is regarding the makefiles of linux kernel modules.
I saw at some sites on net it is suggesting to include the following path:
KERNEL_SOURCE := /usr/src/linux...
while at some places it is askibg to include /lib/modules path:
KERNEL_SOURCE := /lib/modules/2.6.27-7-generic/build... (0 Replies)
Discussion started by: rupeshkp728
0 Replies
6. UNIX for Advanced & Expert Users
Question may seem illogical but I still need clarification.
Can we debug kernel modules loaded on my target system using kdb / kgdb without using any other system or remote debugging?
In other words my question is can we use kdb/kgdb to debug kernel modules running on same system? (2 Replies)
Discussion started by: rupeshkp728
2 Replies
7. Hardware
Hey everyone. I have a question, doing an lsmod gives me a list of all the loaded modules for my system. But how did they know to load? my /etc/modules files is empty, so how did these modules know to load themselves on boot time? If I were to take this hard drive to another computer with a... (6 Replies)
Discussion started by: Lost in Cyberia
6 Replies
8. Linux
Hi,
I am running CentOS 6.5 and I want to remove auto loading 8021q and garp modules, but there are no configure files in /etc/modprobe.d define bot modules.
I even added both module names to /etc/modprobe.d/blacklist.conf, both of them are still loaded after the reboot. How can I disable... (2 Replies)
Discussion started by: hce
2 Replies
9. UNIX for Beginners Questions & Answers
I'm a little embarrassed after all these years I've never really successfully compiled my own kernel. I used this guide to make the following files:
linux-headers-5.1.9_5.1.9-1_amd64.deb
linux-image-5.1.9_5.1.9-1_amd64.deb
linux-libc-dev_5.1.9-1_amd64.deb
When I first booted into this... (4 Replies)
Discussion started by: Azrael
4 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