aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-08-27 21:56:38 +0000
committerDoug Evans <dje@google.com>2009-08-27 21:56:38 +0000
commit55333a841d32ff6f428ef0b4ad7a615e0774db38 (patch)
treefaa3c9d6c4341a5269bba93a62f96f1468760b0a /gdb/objfiles.c
parentb96fec5e9946372e442ab5fac1e3af11f4cc48ad (diff)
downloadgdb-55333a841d32ff6f428ef0b4ad7a615e0774db38.zip
gdb-55333a841d32ff6f428ef0b4ad7a615e0774db38.tar.gz
gdb-55333a841d32ff6f428ef0b4ad7a615e0774db38.tar.bz2
* NEWS: Add note on "info sharedlibrary".
Remove note on "set print symbol-loading". * main.c (captured_main): Pass !batch for from_tty when calling symbol_file_add_main. * objfiles.h (objfile_has_partial_symbols): Declare. (objfile_has_full_symbols): Declare. * objfiles.c (objfile_has_partial_symbols): New function. (have_partial_symbols): Use it. (objfile_has_full_symbols): New function. (have_full_symbols): Use it. * solib.c: Include interps.h. (solib_read_symbols): Back out patch of 2008-07-10. Add test for info_verbose for symbol loading messages for consistency with symfile.c. (info_sharedlibrary_command): Handle optional parameter of regex of libraries to list. Inform user of libraries without debugging info. Rewrite to use ui_out routines to format output. * symfile.c (print_symbol_loading): Delete. (symbol_file_add_with_addrs_or_offsets): Back out patch of 2008-07-10. Print "no debugging symbols found" only if from_tty || info_verbose; and only check file being loaded, not all files. (reread_symbols): Test file being loaded for whether it has symbols, not all files. (__initialize_symfile): Delete `set print symbol-loading'. * symfile.h (print_symbol_loading): Delete. * doc/gdb.texinfo (Symbols): Delete `set print symbol-loading'. (Files): Add note on new optional regex arg to `info sharedlibrary'.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 109a66e..3fa68f6 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -700,6 +700,22 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
breakpoint_re_set ();
}
+/* Return non-zero if OBJFILE has partial symbols. */
+
+int
+objfile_has_partial_symbols (struct objfile *objfile)
+{
+ return objfile->psymtabs != NULL;
+}
+
+/* Return non-zero if OBJFILE has full symbols. */
+
+int
+objfile_has_full_symbols (struct objfile *objfile)
+{
+ return objfile->symtabs != NULL;
+}
+
/* Many places in gdb want to test just to see if we have any partial
symbols available. This function returns zero if none are currently
available, nonzero otherwise. */
@@ -711,10 +727,8 @@ have_partial_symbols (void)
ALL_OBJFILES (ofp)
{
- if (ofp->psymtabs != NULL)
- {
- return 1;
- }
+ if (objfile_has_partial_symbols (ofp))
+ return 1;
}
return 0;
}
@@ -730,10 +744,8 @@ have_full_symbols (void)
ALL_OBJFILES (ofp)
{
- if (ofp->symtabs != NULL)
- {
- return 1;
- }
+ if (objfile_has_full_symbols (ofp))
+ return 1;
}
return 0;
}