Something went wrong. Try again.
(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
Something went wrong. Try again.
2.3 kB · 71 lines
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172.. SPDX-License-Identifier: GPL-2.0
============================================Debugging advice for Linux Kernel developers============================================
general guides--------------
.. toctree:: :maxdepth: 1
driver_development_debugging_guide gdb-kernel-debugging kgdb userspace_debugging_guide
subsystem specific guides-------------------------
.. toctree:: :maxdepth: 1
media_specific_debugging_guide
General debugging advice========================
Depending on the issue, a different set of tools is available to track down theproblem or even to realize whether there is one in the first place.
As a first step you have to figure out what kind of issue you want to debug.Depending on the answer, your methodology and choice of tools may vary.
Do I need to debug with limited access?---------------------------------------
Do you have limited access to the machine or are you unable to stop the runningexecution?
In this case your debugging capability depends on built-in debugging support ofprovided distribution kernel.The :doc:`/process/debugging/userspace_debugging_guide` provides a briefoverview over a range of possible debugging tools in that situation. You cancheck the capability of your kernel, in most cases, by looking into config filewithin the /boot directory.
Do I have root access to the system?------------------------------------
Are you easily able to replace the module in question or to install a newkernel?
In that case your range of available tools is a lot bigger, you can find thetools in the :doc:`/process/debugging/driver_development_debugging_guide`.
Is timing a factor?-------------------
It is important to understand if the problem you want to debug manifests itselfconsistently (i.e. given a set of inputs you always get the same, incorrectoutput), or inconsistently. If it manifests itself inconsistently, some timingfactor might be at play. If inserting delays into the code does change thebehavior, then quite likely timing is a factor.
When timing does alter the outcome of the code execution using a simpleprintk() for debugging purposes may not work, a similar alternative is to usetrace_printk() , which logs the debug messages to the trace file instead of thekernel log.
**Copyright** ©2024 : Collabora