diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2023-08-17 10:17:26 +0000 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2023-09-11 06:15:52 +0000 |
commit | cdda72c2fa1e47c566c7b5768f3831a1cc11d263 (patch) | |
tree | 5d360d7def2b0cb0150f70c8f1fb61b07dd7d2e0 /gdbsupport/btrace-common.h | |
parent | 1bcb9dcf4a9d348d4f970d6d3f8146eae2036010 (diff) | |
download | gdb-cdda72c2fa1e47c566c7b5768f3831a1cc11d263.zip gdb-cdda72c2fa1e47c566c7b5768f3831a1cc11d263.tar.gz gdb-cdda72c2fa1e47c566c7b5768f3831a1cc11d263.tar.bz2 |
gdb: c++ify btrace_target_info
Following the example of private_thread_info and private_inferior, turn
struct btrace_target_info into a small class hierarchy.
Also merge btrace_tinfo_bts with btrace_tinfo_pt and inline into
linux_btrace_target_info.
Fixes PR gdb/30751.
Diffstat (limited to 'gdbsupport/btrace-common.h')
-rw-r--r-- | gdbsupport/btrace-common.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gdbsupport/btrace-common.h b/gdbsupport/btrace-common.h index e287c93..e2649ba 100644 --- a/gdbsupport/btrace-common.h +++ b/gdbsupport/btrace-common.h @@ -214,7 +214,23 @@ private: }; /* Target specific branch trace information. */ -struct btrace_target_info; +struct btrace_target_info +{ + btrace_target_info (ptid_t ptid) : ptid (ptid) + {} + + btrace_target_info (ptid_t ptid, btrace_config conf) + : ptid (ptid), conf (conf) + {} + + virtual ~btrace_target_info () = default; + + /* The ptid of this thread. */ + ptid_t ptid {}; + + /* The obtained branch trace configuration. */ + btrace_config conf {}; +}; /* Enumeration of btrace read types. */ |