aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2016-09-27 16:21:48 -0400
committerSergio Durigan Junior <sergiodj@redhat.com>2016-10-06 17:00:53 -0400
commit1fb77080fd74d11c0dbccf812ed98ffa0b3edc4e (patch)
tree0738b8df2d734c657aca3bd8b3fb70404ed0b4bc /gdb/gdbserver
parentddb6d633875b76f9d772af901118233fc498253a (diff)
downloadgdb-1fb77080fd74d11c0dbccf812ed98ffa0b3edc4e.zip
gdb-1fb77080fd74d11c0dbccf812ed98ffa0b3edc4e.tar.gz
gdb-1fb77080fd74d11c0dbccf812ed98ffa0b3edc4e.tar.bz2
Consolidate API of target_supports_multi_process
This simple commit consolidates the API of target_supports_multi_process. Since both GDB and gdbserver use the same function prototype, all that was needed was to move create this prototype on gdb/target/target.h and turn the macros declared on gdb/{,gdbserver/}target.h into actual functions. Regtested (clean pass) on the BuildBot. gdb/ChangeLog: 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (target_supports_multi_process): New function, moved from... * target.h (target_supports_multi_process): ... here. Remove macro. * target/target.h (target_supports_multi_process): New prototype. gdb/gdbserver/ChangeLog: 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (target_supports_multi_process): New function, moved from... * target.h (target_supports_multi_process): ... here. Remove macro.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/target.c9
-rw-r--r--gdb/gdbserver/target.h4
3 files changed, 16 insertions, 4 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 42edcc7..371431b 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * target.c (target_supports_multi_process): New function, moved
+ from...
+ * target.h (target_supports_multi_process): ... here. Remove
+ macro.
+
2016-10-05 Tom Tromey <tom@tromey.com>
PR remote/20655:
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c
index fd7c714..249a063 100644
--- a/gdb/gdbserver/target.c
+++ b/gdb/gdbserver/target.c
@@ -302,6 +302,15 @@ target_continue (ptid_t ptid, enum gdb_signal signal)
(*the_target->resume) (&resume_info, 1);
}
+/* See target/target.h. */
+
+int
+target_supports_multi_process (void)
+{
+ return (the_target->supports_multi_process != NULL ?
+ (*the_target->supports_multi_process) () : 0);
+}
+
int
start_non_stop (int nonstop)
{
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index 26f7422..d098a92 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -535,10 +535,6 @@ int kill_inferior (int);
#define target_async(enable) \
(the_target->async ? (*the_target->async) (enable) : 0)
-#define target_supports_multi_process() \
- (the_target->supports_multi_process ? \
- (*the_target->supports_multi_process) () : 0)
-
#define target_process_qsupported(features, count) \
do \
{ \