From 744ed1ee391fa604fe9eb854f5ca25120061c832 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sat, 12 Jun 2021 10:27:01 +0200 Subject: [PATCH] [gdb/symtab] Add lazy_expand_symtab_p, default to false 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gdb/psymtab.c b/gdb/psymtab.c index fe32486e2fc..7efc56270e4 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -37,6 +37,8 @@ #include #include +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); } -- 2.47.2