This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: remove find_run_target
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 27 Jun 2013 13:52:30 -0600
- Subject: FYI: remove find_run_target
I'm checking this in.
I noticed that find_run_target is not used.
Thanks to "git log -S" I was able to discover that the last use was
removed here:
commit 2c862b3b5e7bd76a43a4c14a7c5151b8a036f2a6
Author: Daniel Jacobowitz <dan@debian.org>
Date: Tue Jan 29 22:47:20 2008 +0000
* Makefile.in (symfile.o): Update.
* NEWS: Mention exec tracing support.
* inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
exec events.
[...]
This patch removes the function.
Tested by rebuilding + grep.
Tom
2013-06-27 Tom Tromey <tromey@redhat.com>
* target.c (find_run_target): Remove.
* target.h (find_run_target): Remove.
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.337
diff -u -r1.337 target.c
--- target.c 27 Jun 2013 19:38:24 -0000 1.337
+++ target.c 27 Jun 2013 19:51:47 -0000
@@ -3627,30 +3627,6 @@
return -1;
}
-/* Find a single runnable target in the stack and return it. If for
- some reason there is more than one, return NULL. */
-
-struct target_ops *
-find_run_target (void)
-{
- struct target_ops **t;
- struct target_ops *runable = NULL;
- int count;
-
- count = 0;
-
- for (t = target_structs; t < target_structs + target_struct_size; ++t)
- {
- if ((*t)->to_can_run && target_can_run (*t))
- {
- runable = *t;
- ++count;
- }
- }
-
- return (count == 1 ? runable : NULL);
-}
-
/*
* Find the next target down the stack from the specified target.
*/
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.263
diff -u -r1.263 target.h
--- target.h 4 Jun 2013 13:10:53 -0000 1.263
+++ target.h 27 Jun 2013 19:51:48 -0000
@@ -1948,8 +1948,6 @@
extern void find_default_create_inferior (struct target_ops *,
char *, char *, char **, int);
-extern struct target_ops *find_run_target (void);
-
extern struct target_ops *find_target_beneath (struct target_ops *);
/* Read OS data object of type TYPE from the target, and return it in