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.
This commit is contained in:
Pedro Alves
2009-06-19 13:35:35 +00:00
parent 5e7c27a607
commit cf8fd78b38
4 changed files with 35 additions and 3 deletions

View File

@@ -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);