[1/8] Remove target_has_all_memory

Message ID 20200721014914.29937-2-tom@tromey.com
State New
Headers show
Series
  • Remove object-like target macros
Related show

Commit Message

Tom Tromey July 21, 2020, 1:49 a.m.
target_has_all_memory isn't used anywhere, so this patch removes it.

gdb/ChangeLog
2020-07-20  Tom Tromey  <tom@tromey.com>

	* target.c (target_has_all_memory_1): Remove.
	* target.h (target_has_all_memory): Remove define.
	(target_has_all_memory_1): Don't declare.
---
 gdb/ChangeLog |  6 ++++++
 gdb/target.c  | 10 ----------
 gdb/target.h  |  7 -------
 3 files changed, 6 insertions(+), 17 deletions(-)

-- 
2.17.2

Patch

diff --git a/gdb/target.c b/gdb/target.c
index cd66675e8a4..afd1d5b327d 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -169,16 +169,6 @@  show_targetdebug (struct ui_file *file, int from_tty,
   fprintf_filtered (file, _("Target debugging is %s.\n"), value);
 }
 
-int
-target_has_all_memory_1 (void)
-{
-  for (target_ops *t = current_top_target (); t != NULL; t = t->beneath ())
-    if (t->has_all_memory ())
-      return 1;
-
-  return 0;
-}
-
 int
 target_has_memory_1 (void)
 {
diff --git a/gdb/target.h b/gdb/target.h
index 4e8d4cccd5c..208866a9c05 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1792,13 +1792,6 @@  extern void default_target_pass_ctrlc (struct target_ops *ops);
      (current_top_target ()->rcmd) (command, outbuf)
 
 
-/* Does the target include all of memory, or only part of it?  This
-   determines whether we look up the target chain for other parts of
-   memory if this target can't satisfy a request.  */
-
-extern int target_has_all_memory_1 (void);
-#define target_has_all_memory target_has_all_memory_1 ()
-
 /* Does the target include memory?  (Dummy targets don't.)  */
 
 extern int target_has_memory_1 (void);