summaryrefslogtreecommitdiff
path: root/gdb/infrun.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-17 11:27:35 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-03-31 11:32:33 -0400
commit4f5539f026fafe2a3bf190dd86e95f87d75a00e7 (patch)
tree024e004b82ad1876ab1e240014e90a07481de2a9 /gdb/infrun.h
parent6e6e87de92b1c3ba95bf5f1932c59efea71ec4f6 (diff)
gdb/infrun: add reason parameter to stop_all_threads
Add a "reason" parameter, only used to show in debug messages what is the reason for stopping all threads. This helped me understand the debug logs while adding some new uses of stop_all_threads, so I am proposing to merge it. Change-Id: I66c8c335ebf41836a7bc3d5fe1db92c195f65e55
Diffstat (limited to 'gdb/infrun.h')
-rw-r--r--gdb/infrun.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/infrun.h b/gdb/infrun.h
index 1209b4188e..ecfb767692 100644
--- a/gdb/infrun.h
+++ b/gdb/infrun.h
@@ -40,8 +40,8 @@ extern bool debug_infrun;
/* Print "infrun" start/end debug statements. */
-#define INFRUN_SCOPED_DEBUG_START_END(msg) \
- scoped_debug_start_end (debug_infrun, "infrun", msg)
+#define INFRUN_SCOPED_DEBUG_START_END(fmt, ...) \
+ scoped_debug_start_end (debug_infrun, "infrun", fmt, ##__VA_ARGS__)
/* Print "infrun" enter/exit debug statements. */
@@ -138,8 +138,11 @@ extern void set_last_target_status (process_stratum_target *target, ptid_t ptid,
target_wait(). */
extern void nullify_last_target_wait_ptid ();
-/* Stop all threads. Only returns after everything is halted. */
-extern void stop_all_threads (void);
+/* Stop all threads. Only returns after everything is halted.
+
+ REASON is a string indicating the reason why we stop all threads, used in
+ debug messages. */
+extern void stop_all_threads (const char *reason);
extern void prepare_for_detach (void);