[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241014141345.5680-5-david.hunter.linux@gmail.com>
Date: Mon, 14 Oct 2024 10:13:34 -0400
From: David Hunter <david.hunter.linux@...il.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: David Hunter <david.hunter.linux@...il.com>,
linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org,
shuah@...nel.org,
javier.carrasco.cruz@...il.com,
Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH v1 4/7] streamline_config.pl: include tool to learn about a config option
Include a debugging tool that can help developers find out about a
particular config option.
It can be challenging to find out what is going on behind the scenes of
the script due to the vast amount of config options and the ways the
config options interact with each other.
Signed-off-by: David Hunter <david.hunter.linux@...il.com>
---
scripts/kconfig/streamline_config.pl | 49 ++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index f5a07b3a1922..bbcd5a6e9726 100755
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -713,4 +713,53 @@ foreach my $module (keys(%modules)) {
}
}
+# the following tool can be used to check a particular config option.
+# You can read the output if the variable "debugprint" is set to "1."
+# Here is a sample way to use the tool:
+# dprintvar("INET_ESP");
+#
+sub dprintvar {
+ if ($debugprint) {
+ my $dconfig = $_[0];
+ my $fconfig = "CONFIG_$dconfig";
+ my $con_found = "";
+ my $dep_found = "";
+ my $def_found = "";
+ my $sel_found = "";
+ my $prom_found = "";
+ my $ori_found = "";
+ my $proc_found = "";
+
+ if (defined($configs{$fconfig})) {
+ $con_found = $configs{$fconfig};
+ }
+ if (defined($depends{$dconfig})) {
+ $dep_found = $depends{$dconfig};
+ }
+ if (defined($defaults{$dconfig})) {
+ $def_found = $defaults{$dconfig};
+ }
+ if (defined($selects{$dconfig})) {
+ $sel_found = $selects{$dconfig};
+ }
+ if (defined($prompts{$dconfig})) {
+ $prom_found = $prompts{$dconfig};
+ }
+ if (defined($orig_configs{$fconfig})) {
+ $ori_found = $orig_configs{$fconfig};
+ }
+ if (defined($process_selects{$dconfig})) {
+ $proc_found = $process_selects{$dconfig};
+ }
+
+ dprint "config: $dconfig\n";
+ dprint "config found: $con_found\n";
+ dprint "depends: $dep_found\n";
+ dprint "defaults: $def_found\n";
+ dprint "selects: $sel_found\n";
+ dprint "prompts: $prom_found\n";
+ dprint "in original config: $ori_found\n";
+ dprint "process selected: $proc_found\n";
+ }
+}
# vim: softtabstop=4
--
2.43.0
Powered by blists - more mailing lists