From cdda72c2fa1e47c566c7b5768f3831a1cc11d263 Mon Sep 17 00:00:00 2001 From: Markus Metzger Date: Thu, 17 Aug 2023 10:17:26 +0000 Subject: 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. --- gdbsupport/btrace-common.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gdbsupport') 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. */ -- cgit v1.1