1 //! Provide extra information for a thread
2 use crate::common::Tid;
3 use crate::target::Target;
4 
5 /// Target Extension - Provide extra information for a thread
6 pub trait ThreadExtraInfo: Target {
7     /// Provide extra information about a thread
8     ///
9     /// GDB queries for extra information for a thread as part of the
10     /// `info threads` command.  This function will be called once
11     /// for each active thread.
12     ///
13     /// A string can be copied into `buf` that will then be displayed
14     /// to the client.  The string is displayed as `(value)`, such as:
15     ///
16     /// `Thread 1.1 (value)`
17     ///
18     /// Return the number of bytes written into `buf`.
thread_extra_info(&self, tid: Tid, buf: &mut [u8]) -> Result<usize, Self::Error>19     fn thread_extra_info(&self, tid: Tid, buf: &mut [u8]) -> Result<usize, Self::Error>;
20 }
21 
22 define_ext!(ThreadExtraInfoOps, ThreadExtraInfo);
23