aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-19 21:33:50 -0700
committerTom Tromey <tom@tromey.com>2019-12-12 15:50:53 -0700
commitdeeafabb678e59d8585be6d765c7fbd0e7060b6c (patch)
tree8fd33588e29dd7740f741b547e674656f1a0d784 /gdb/progspace.c
parent234529260a90b6ac6ed38ddac45d6ed15149e8f8 (diff)
downloadfsf-binutils-gdb-deeafabb678e59d8585be6d765c7fbd0e7060b6c.zip
fsf-binutils-gdb-deeafabb678e59d8585be6d765c7fbd0e7060b6c.tar.gz
fsf-binutils-gdb-deeafabb678e59d8585be6d765c7fbd0e7060b6c.tar.bz2
Remove MULTI_OBJFILE_P
This removes the MULTI_OBJFILE_P macro in favor of a method on the program space. gdb/ChangeLog 2019-12-12 Tom Tromey <tom@tromey.com> * progspace.c (program_space::multi_objfile_p): New method. * printcmd.c (info_symbol_command): Update. * maint.c (maintenance_translate_address): Update. * objfiles.h (MULTI_OBJFILE_P): Remove. * progspace.h (struct program_space) <multi_objfile_p>: New method. Change-Id: I2779e26ea8909078d63fea8f13bce94cab73948c
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r--gdb/progspace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index e6c4f55..a39b34c 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -200,6 +200,14 @@ program_space::remove_objfile (struct objfile *objfile)
_("remove_objfile: objfile already unlinked"));
}
+/* See progspace.h. */
+
+bool
+program_space::multi_objfile_p () const
+{
+ return objfiles_head != nullptr && objfiles_head->next != nullptr;
+}
+
/* Copies program space SRC to DEST. Copies the main executable file,
and the main symbol file. Returns DEST. */