From: Jeffrey Merkey <jeffmerkey@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, aryabinin@virtuozzo.com,
dan.j.williams@intel.com, dave@stgolabs.net, mingo@kernel.org,
nikolay@cumulusnetworks.com, paulmck@linux.vnet.ibm.com,
vladimir.murzin@arm.com
Subject: [PATCH v5 2/3] Add BUG_XX() debugging options Kconfig.debug
Date: Mon, 1 Feb 2016 19:33:47 -0700 [thread overview]
Message-ID: <1454380428-31474-2-git-send-email-jeffmerkey@gmail.com> (raw)
In-Reply-To: <1454380428-31474-1-git-send-email-jeffmerkey@gmail.com>
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
next prev parent reply other threads:[~2016-02-02 2:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 2:33 [PATCH v5 1/3] Add BUG_XX() debugging options Jeffrey Merkey
2016-02-02 2:33 ` Jeffrey Merkey [this message]
2016-02-02 2:33 ` [PATCH v5 3/3] Add BUG_XX() debugging hard/soft lockup detection Jeffrey Merkey
2016-02-02 17:30 ` Don Zickus
2016-02-02 22:40 ` Jeffrey Merkey
2016-02-03 4:17 ` Jeffrey Merkey
2016-02-03 4:39 ` Jeffrey Merkey
2016-02-03 15:45 ` Don Zickus
2016-02-03 17:23 ` Jeffrey Merkey
2016-02-03 20:14 ` Don Zickus
2016-02-03 20:18 ` Jeffrey Merkey
2016-02-04 2:48 ` Jeffrey Merkey
2016-02-03 15:47 ` Don Zickus
2016-02-03 17:26 ` Jeffrey Merkey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454380428-31474-2-git-send-email-jeffmerkey@gmail.com \
--to=jeffmerkey@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=vladimir.murzin@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox