]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/symtab] Add lazy_expand_symtab_p, default to false
authorTom de Vries <tdevries@suse.de>
Sat, 12 Jun 2021 08:27:01 +0000 (10:27 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 15:44:35 +0000 (17:44 +0200)
Add variable to enable lazy symbol table expansion.

Set to false for now, to enable gradual introduction of implementation.

Make user-settable using "maint set/show lazy-expand-symtab on/off".

gdb/psymtab.c

index fe32486e2fc54ca4073cac426fddac99d420b349..7efc56270e4bf8b18f10205dddcfd350fc85e594 100644 (file)
@@ -37,6 +37,8 @@
 #include <algorithm>
 #include <set>
 
+bool lazy_expand_symtab_p = false;
+
 static struct partial_symbol *lookup_partial_symbol (struct objfile *,
                                                     struct partial_symtab *,
                                                     const lookup_name_info &,
@@ -1952,4 +1954,12 @@ just the symbol table structures themselves."),
           _("\
 Check consistency of currently expanded psymtabs versus symtabs."),
           &maintenancelist);
+
+  add_setshow_boolean_cmd ("lazy-expand-symtab", class_maintenance,
+                          &lazy_expand_symtab_p,
+                          _("Set whether symtabs are expanded lazily."),
+                          _("Show whether symtabs are expanded lazily."),
+                          _("Control whether symtabs are expanded lazily."),
+                          NULL, NULL,
+                          &maintenance_set_cmdlist, &maintenance_show_cmdlist);
 }