diff options
author | Pedro Alves <palves@redhat.com> | 2009-06-19 13:35:35 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-06-19 13:35:35 +0000 |
commit | cf8fd78b3890f7c0a8050f7dc6cefaa8918374f9 (patch) | |
tree | 87acb8302fad51432a54c125a357661c2a7666c3 /gdb/gdbserver/target.h | |
parent | 5e7c27a6076edbd535b3988449c0f24b40ac2371 (diff) | |
download | gdb-cf8fd78b3890f7c0a8050f7dc6cefaa8918374f9.zip gdb-cf8fd78b3890f7c0a8050f7dc6cefaa8918374f9.tar.gz gdb-cf8fd78b3890f7c0a8050f7dc6cefaa8918374f9.tar.bz2 |
2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
Pedro Alves <pedro@codesourcery.com>
* target.h (struct target_ops) <supports_multi_process>: New
callback.
(target_supports_multi_process): New.
* server.c (handle_query): Even if GDB reports support, only
enable multi-process if the target also supports it. Report
multi-process support only if the target backend supports it.
* linux-low.c (linux_supports_multi_process): New function.
(linux_target_ops): Install it as target_supports_multi_process
callback.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r-- | gdb/gdbserver/target.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h index 7ff3849..70b5d01 100644 --- a/gdb/gdbserver/target.h +++ b/gdb/gdbserver/target.h @@ -275,6 +275,9 @@ struct target_ops /* Switch to non-stop (1) or all-stop (0) mode. Return 0 on success, -1 otherwise. */ int (*start_non_stop) (int); + + /* Returns true if the target supports multi-process debugging. */ + int (*supports_multi_process) (void); }; extern struct target_ops *the_target; @@ -311,6 +314,10 @@ void set_target_ops (struct target_ops *); #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) + /* Start non-stop mode, returns 0 on success, -1 on failure. */ int start_non_stop (int nonstop); |