diff options
author | Tom Tromey <tromey@adacore.com> | 2021-08-30 06:24:12 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-12-02 08:58:22 -0700 |
commit | bc75fb44c5693114b3dc654a2e4b39c9b5a9ca26 (patch) | |
tree | 88521df79005aa37964020587b7c288f432fc1ef /gdb/gdbthread.h | |
parent | 8a18382f94515b4be7e51dbe3865d202403d21d5 (diff) | |
download | gdb-bc75fb44c5693114b3dc654a2e4b39c9b5a9ca26.zip gdb-bc75fb44c5693114b3dc654a2e4b39c9b5a9ca26.tar.gz gdb-bc75fb44c5693114b3dc654a2e4b39c9b5a9ca26.tar.bz2 |
Implement 'task apply'
This adds a 'task apply' command, which is the Ada tasking analogue of
'thread apply'. Unlike 'thread apply', it doesn't offer the
'ascending' flag; but otherwise it's essentially the same.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r-- | gdb/gdbthread.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index a4c1244..e229a5f 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -975,4 +975,21 @@ extern void thread_select (const char *tidstr, class thread_info *thr); target to get the name. May return nullptr. */ extern const char *thread_name (thread_info *thread); +/* Switch to thread TP if it is alive. Returns true if successfully + switched, false otherwise. */ + +extern bool switch_to_thread_if_alive (thread_info *thr); + +/* Assuming that THR is the current thread, execute CMD. + If ADA_TASK is not empty, it is the Ada task ID, and will + be printed instead of the thread information. + FLAGS.QUIET controls the printing of the thread information. + FLAGS.CONT and FLAGS.SILENT control how to handle errors. Can throw an + exception if !FLAGS.SILENT and !FLAGS.CONT and CMD fails. */ + +extern void thread_try_catch_cmd (thread_info *thr, + gdb::optional<int> ada_task, + const char *cmd, int from_tty, + const qcs_flags &flags); + #endif /* GDBTHREAD_H */ |