diff options
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/target.h | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 1fc24be..0f30c66 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2015-05-15 Pedro Alves <palves@redhat.com> + + * target.h (target_handle_new_gdb_connection): Rewrite using if + wrapped in do/while. + 2015-05-14 Joel Brobecker <brobecker@adacore.com> * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check. diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index 8d23383..e9c6be0 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -437,9 +437,12 @@ int kill_inferior (int); (the_target->supports_vfork_events ? \ (*the_target->supports_vfork_events) () : 0) -#define target_handle_new_gdb_connection() \ - (the_target->handle_new_gdb_connection ? \ - (*the_target->handle_new_gdb_connection) () : 0) +#define target_handle_new_gdb_connection() \ + do \ + { \ + if (the_target->handle_new_gdb_connection != NULL) \ + (*the_target->handle_new_gdb_connection) (); \ + } while (0) #define detach_inferior(pid) \ (*the_target->detach) (pid) |