aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-11-28 11:43:13 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-12-02 14:40:24 -0500
commite26d0dab1018d9ed6eaf3ab127ce9928cd8ac271 (patch)
tree1d7c5a87c703d5db087903925e866b170cc03a45 /gdb/solib.c
parentac57bf55472df186dc9fb63f7787f740d457f473 (diff)
downloadgdb-e26d0dab1018d9ed6eaf3ab127ce9928cd8ac271.zip
gdb-e26d0dab1018d9ed6eaf3ab127ce9928cd8ac271.tar.gz
gdb-e26d0dab1018d9ed6eaf3ab127ce9928cd8ac271.tar.bz2
gdb: merge solib-frv aix-solib debug options into "set/show debug solib"
solib implementations are typically used one at a time. So it will be rare that you will want to enable debug for one solib kind, and absolutely want to keep the others disabled. To make things simpler, instead of adding separate variables / macros / commands for each solib implementation, merge the existing ones (frv and aix) into a unified "set/show debug solib", with the solib_debug_printf macro. Change-Id: I6e18bbc7401724f37ae66681badb079d75ecf7fa
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index 7cfdd81..59fd866 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -55,13 +55,9 @@
#include "cli/cli-style.h"
#include "solib-target.h"
-/* Architecture-specific operations. */
-
-
-
-/* external data declarations */
+/* See solib.h. */
-/* Local function prototypes */
+bool debug_solib;
/* If non-empty, this is a search path for loading non-absolute shared library
symbol files. This takes precedence over the environment variables PATH
@@ -1808,4 +1804,12 @@ PATH and LD_LIBRARY_PATH."),
reload_shared_libraries,
show_solib_search_path,
&setlist, &showlist);
+
+ add_setshow_boolean_cmd ("solib", class_maintenance,
+ &debug_solib, _("\
+Set solib debugging."), _("\
+Show solib debugging."), _("\
+When true, solib-related debugging output is enabled."),
+ nullptr, nullptr,
+ &setdebuglist, &showdebuglist);
}