diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e1cfc193ef..95f2b92f65 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2016-10-06 Sergio Durigan Junior + + * 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. + 2016-10-06 Pedro Alves * cp-valprint.c (vtbl_ptr_name): Write "extern const" instead of diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 42edcc792e..371431b183 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2016-10-06 Sergio Durigan Junior + + * target.c (target_supports_multi_process): New function, moved + from... + * target.h (target_supports_multi_process): ... here. Remove + macro. + 2016-10-05 Tom Tromey PR remote/20655: diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index fd7c7141db..249a063143 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 26f7422162..d098a92efe 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 \ { \ diff --git a/gdb/target.c b/gdb/target.c index b6a7e6408d..cb89e75086 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -2727,6 +2727,14 @@ target_supports_disable_randomization (void) return 0; } +/* See target/target.h. */ + +int +target_supports_multi_process (void) +{ + return (*current_target.to_supports_multi_process) (¤t_target); +} + char * target_get_osdata (const char *type) { diff --git a/gdb/target.h b/gdb/target.h index b458970c1a..176f332931 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -1380,12 +1380,6 @@ struct address_space *target_thread_address_space (ptid_t); int target_info_proc (const char *, enum info_proc_what); -/* Returns true if this target can debug multiple processes - simultaneously. */ - -#define target_supports_multi_process() \ - (*current_target.to_supports_multi_process) (¤t_target) - /* Returns true if this target can disable address space randomization. */ int target_supports_disable_randomization (void); diff --git a/gdb/target/target.h b/gdb/target/target.h index be41fa74a5..2f4c716171 100644 --- a/gdb/target/target.h +++ b/gdb/target/target.h @@ -90,4 +90,9 @@ extern ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status, extern void target_mourn_inferior (ptid_t ptid); +/* Return 1 if this target can debug multiple processes + simultaneously, zero otherwise. */ + +extern int target_supports_multi_process (void); + #endif /* TARGET_COMMON_H */