aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2015-09-18 21:43:38 -0700
committerDoug Evans <xdje42@gmail.com>2015-09-18 21:43:38 -0700
commit015d2e7e49056e0d5fea1c18bf8de9b1be7c096f (patch)
tree5e18796c5f9b2e007b0f0a5449f1fae6a1357625 /gdb/objfiles.c
parentd96c806b9210f2a9dc07f9ebfc811b3fc0c0f870 (diff)
downloadbinutils-015d2e7e49056e0d5fea1c18bf8de9b1be7c096f.zip
binutils-015d2e7e49056e0d5fea1c18bf8de9b1be7c096f.tar.gz
binutils-015d2e7e49056e0d5fea1c18bf8de9b1be7c096f.tar.bz2
default_read_var_value <LOC_UNRESOLVED>: Include minsym kind in error message.
bfd/ChangeLog: * targets.c (enum bfd_flavour): Add comment. (bfd_flavour_name): New function. * bfd-in2.h: Regenerate. gdb/ChangeLog: * findvar.c (default_read_var_value) <LOC_UNRESOLVED>: Include the kind of minimal symbol in the error message. * objfiles.c (objfile_flavour_name): New function. * objfiles.h (objfile_flavour_name): Declare. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-bad-unresolved.c: New file. * gdb.dwarf2/dw2-bad-unresolved.exp: New file.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 907126c..f6be91e 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -1614,6 +1614,16 @@ objfile_debug_name (const struct objfile *objfile)
return lbasename (objfile->original_name);
}
+/* See objfiles.h. */
+
+const char *
+objfile_flavour_name (struct objfile *objfile)
+{
+ if (objfile->obfd != NULL)
+ return bfd_flavour_name (bfd_get_flavour (objfile->obfd));
+ return NULL;
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_objfiles;