Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323718 > unrolled thread

[PATCH v5 2/3] Add BUG_XX() debugging options Kconfig.debug

Started byJeffrey Merkey <jeffmerkey@gmail.com>
First post2016-02-02 03:40 +0100
Last post2016-02-02 03:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 2/3] Add BUG_XX() debugging options Kconfig.debug Jeffrey Merkey <jeffmerkey@gmail.com> - 2016-02-02 03:40 +0100

#1323718 — [PATCH v5 2/3] Add BUG_XX() debugging options Kconfig.debug

FromJeffrey Merkey <jeffmerkey@gmail.com>
Date2016-02-02 03:40 +0100
Subject[PATCH v5 2/3] Add BUG_XX() debugging options Kconfig.debug
Message-ID<qXz2O-3Wf-19@gated-at.bofh.it>
This patch series adds config options which can be set during compile to
direct the compiler to output a breakpoint instruction anywhere a BUG()
macro has been placed in the kernel to trigger the system to
enter a debugger if a bug is detected by the system.  Use of this
compile time option also allows conditional breakpoints to be set in the
kernel with these currently used macros.

This addition is extremely useful for debugging hard and soft lockups
real time and quickly from a console debugger, and other areas of the
kernel.

Signed-off-by: Jeffrey Merkey <jeffmerkey@gmail.com>
---
 lib/Kconfig.debug | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 041f995..1f7437d 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -326,6 +326,17 @@ config SECTION_MISMATCH_WARN_ONLY
 # is preferred to always offer frame pointers as a config
 # option on the architecture (regardless of KERNEL_DEBUG):
 #
+config DEBUG_BUG
+	bool "Set Breakpoint for Kernel BUG() macros"
+	depends on DEBUG_KERNEL && !S390
+	help
+	  Say Y here to enable the kernel to emit a breakpoint instruction
+	  anywhere a BUG_XX() macro has been placed in the system kernel code
+	  intended to catch bugs.
+
+	  This option is used for triggering the OS to try enter a debugger
+	  if one is presently installed on the system.
+
 config ARCH_WANT_FRAME_POINTERS
 	bool
 	help
-- 
1.8.3.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web