summaryrefslogtreecommitdiff
path: root/gdb/target.h
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>1999-01-13 23:53:30 +0000
committerMichael Snyder <msnyder@vmware.com>1999-01-13 23:53:30 +0000
commit3ab2abae9ac2dc0ab96fc2d1a678b463485b90a0 (patch)
treec919d87fb60c29ccbb90e963dbd94a1049b5069f /gdb/target.h
parentea377ea4c0b8e9c25328cff0240c958f82ffd311 (diff)
downloadbinutils-gdb-3ab2abae9ac2dc0ab96fc2d1a678b463485b90a0.tar.gz
Wed Jan 13 14:59:02 1999 Michael Snyder <msnyder@cleaver.cygnus.com>
* infrun.c (set/show scheduler-locking) New command. Set a mode bit that will control how GDB attempts to control thread scheduling for step, continue, etc. (resume): make use of the schedule-locking mode. * target.h (struct target_ops): new field to_has_thread_control. * sol-thread.c: initialize target_ops to_has_thread_control. * procfs.c: ditto. * target.c: ditto. * m3-nat.c: ditto. * remote.c: ditto. * hpux-thread.c: ditto.
Diffstat (limited to 'gdb/target.h')
-rw-r--r--gdb/target.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h
index ccf047f7f9d..c9d6b6e810d 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -51,6 +51,12 @@ enum strata {
process_stratum /* Executing processes */
};
+enum thread_control_capabilities {
+ tc_none = 0, /* Default: can't control thread execution. */
+ tc_schedlock = 1, /* Can lock the thread scheduler. */
+ tc_switch = 2, /* Can switch the running thread on demand. */
+};
+
/* Stuff for target_wait. */
/* Generally, what has the program done? */
@@ -361,6 +367,7 @@ struct target_ops
int to_has_stack;
int to_has_registers;
int to_has_execution;
+ int to_has_thread_control; /* control thread execution */
struct section_table
*to_sections;
struct section_table
@@ -934,6 +941,16 @@ print_section_info PARAMS ((struct target_ops *, bfd *));
#define target_has_execution \
(current_target.to_has_execution)
+/* Can the target support the debugger control of thread execution?
+ a) Can it lock the thread scheduler?
+ b) Can it switch the currently running thread? */
+
+#define target_can_lock_scheduler \
+ (current_target.to_has_thread_control & tc_schedlock)
+
+#define target_can_switch_threads \
+ (current_target.to_has_thread_control & tc_switch)
+
extern void target_link PARAMS ((char *, CORE_ADDR *));
/* Converts a process id to a string. Usually, the string just contains