#include "target/waitstatus.h" /* For enum target_stop_reason. */
#include "tracepoint.h"
+#include <list>
+
#define PTRACE_XFER_TYPE long
#ifdef HAVE_LINUX_REGSETS
#define get_thread_lwp(thr) ((struct lwp_info *) (thread_target_data (thr)))
#define get_lwp_thread(lwp) ((lwp)->thread)
+/* Information about a signal that is to be delivered to a thread. */
+
+struct pending_signal
+{
+ pending_signal (int signal)
+ : signal {signal}
+ {};
+
+ int signal;
+ siginfo_t info;
+};
+
/* This struct is recorded in the target_data field of struct thread_info.
On linux ``all_threads'' is keyed by the LWP ID, which we use as the
next time we see this LWP stop. */
int must_set_ptrace_flags;
- /* If this is non-zero, it points to a chain of signals which need to
- be delivered to this process. */
- struct pending_signals *pending_signals;
+ /* A chain of signals that need to be delivered to this process. */
+ std::list<pending_signal> pending_signals;
/* A link used when resuming. It is initialized from the resume request,
and then processed and cleared in linux_resume_one_lwp. */
if a signal arrives to this lwp while it is collecting. */
fast_tpoint_collect_result collecting_fast_tracepoint;
- /* If this is non-zero, it points to a chain of signals which need
- to be reported to GDB. These were deferred because the thread
- was doing a fast tracepoint collect when they arrived. */
- struct pending_signals *pending_signals_to_report;
+ /* A chain of signals that need to be reported to GDB. These were
+ deferred because the thread was doing a fast tracepoint collect
+ when they arrived. */
+ std::list<pending_signal> pending_signals_to_report;
/* When collecting_fast_tracepoint is first found to be 1, we insert
a exit-jump-pad-quickly breakpoint. This is it. */