diff options
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 3660f1a..8eb4eb4 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -106,7 +106,7 @@ void _initialize_symtab (void); /* */ /* When non-zero, print debugging messages related to symtab creation. */ -int symtab_create_debug = 0; +unsigned int symtab_create_debug = 0; /* Non-zero if a file may be known by two different basenames. This is the uncommon case, and significantly slows down gdb. @@ -174,6 +174,22 @@ search_domain_name (enum search_domain e) } } +/* Set the primary field in SYMTAB. */ + +void +set_symtab_primary (struct symtab *symtab, int primary) +{ + symtab->primary = primary; + + if (symtab_create_debug && primary) + { + fprintf_unfiltered (gdb_stdlog, + "Created primary symtab %s for %s.\n", + host_address_to_string (symtab), + symtab_to_filename_for_display (symtab)); + } +} + /* See whether FILENAME matches SEARCH_NAME using the rule that we advertise to the user. (The manual's description of linespecs describes what we advertise). Returns true if they match, false @@ -5273,13 +5289,15 @@ one base name, and gdb will do file name comparisons more efficiently."), NULL, NULL, &setlist, &showlist); - add_setshow_boolean_cmd ("symtab-create", no_class, &symtab_create_debug, - _("Set debugging of symbol table creation."), - _("Show debugging of symbol table creation."), _("\ -When enabled, debugging messages are printed when building symbol tables."), - NULL, - NULL, - &setdebuglist, &showdebuglist); + add_setshow_zuinteger_cmd ("symtab-create", no_class, &symtab_create_debug, + _("Set debugging of symbol table creation."), + _("Show debugging of symbol table creation."), _("\ +When enabled (non-zero), debugging messages are printed when building\n\ +symbol tables. A value of 1 (one) normally provides enough information.\n\ +A value greater than 1 provides more verbose information."), + NULL, + NULL, + &setdebuglist, &showdebuglist); observer_attach_executable_changed (symtab_observer_executable_changed); } |