aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-06-15 14:49:32 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-07-12 20:46:52 -0400
commit8b6a69b2f37fd1370aa823320f9dc3fd482e1e78 (patch)
treeaadd270b49270314c5c60f4e25ae1dd6ce74c9a4 /gdb/infrun.h
parent08bdefb58b78621f50b30f64170e2cdc31c1b2cf (diff)
downloadgdb-8b6a69b2f37fd1370aa823320f9dc3fd482e1e78.zip
gdb-8b6a69b2f37fd1370aa823320f9dc3fd482e1e78.tar.gz
gdb-8b6a69b2f37fd1370aa823320f9dc3fd482e1e78.tar.bz2
gdb: use intrusive list for step-over chain
The threads that need a step-over are currently linked using an hand-written intrusive doubly-linked list, so that seems a very good candidate for intrusive_list, convert it. For this, we have a use case of appending a list to another one (in start_step_over). Based on the std::list and Boost APIs, add a splice method. However, only support splicing the other list at the end of the `this` list, since that's all we need. Add explicit default assignment operators to reference_to_pointer_iterator, which are otherwise implicitly deleted. This is needed because to define thread_step_over_list_safe_iterator, we wrap reference_to_pointer_iterator inside a basic_safe_iterator, and basic_safe_iterator needs to be able to copy-assign the wrapped iterator. The move-assignment operator is therefore not needed, only the copy-assignment operator is. But for completeness, add both. Change-Id: I31b2ff67c7b78251314646b31887ef1dfebe510c
Diffstat (limited to 'gdb/infrun.h')
-rw-r--r--gdb/infrun.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/infrun.h b/gdb/infrun.h
index 7ebb9fc..5a57736 100644
--- a/gdb/infrun.h
+++ b/gdb/infrun.h
@@ -18,8 +18,10 @@
#ifndef INFRUN_H
#define INFRUN_H 1
+#include "gdbthread.h"
#include "symtab.h"
#include "gdbsupport/byte-vector.h"
+#include "gdbsupport/intrusive_list.h"
struct target_waitstatus;
struct frame_info;
@@ -253,7 +255,7 @@ extern void mark_infrun_async_event_handler (void);
/* The global chain of threads that need to do a step-over operation
to get past e.g., a breakpoint. */
-extern struct thread_info *global_thread_step_over_chain_head;
+extern thread_step_over_list global_thread_step_over_list;
/* Remove breakpoints if possible (usually that means, if everything
is stopped). On failure, print a message. */