aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-low.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-07-26 10:55:35 +0200
committerSimon Marchi <simon.marchi@ericsson.com>2017-07-26 10:57:07 +0200
commit229d26fc9ebca61b8d899cf8fe4342a6cc9795ff (patch)
treebff590bda11b4ecd533f6cff44f659411bc11696 /gdb/gdbserver/linux-low.h
parent11f10936902160e9b1474fd0a06ea44a5a6445ee (diff)
downloadgdb-229d26fc9ebca61b8d899cf8fe4342a6cc9795ff.zip
gdb-229d26fc9ebca61b8d899cf8fe4342a6cc9795ff.tar.gz
gdb-229d26fc9ebca61b8d899cf8fe4342a6cc9795ff.tar.bz2
Add enum for result of fast_tracepoint_collecting
I got confused by the result value of fast_tracepoint_collecting, while it sounds like it would return true/false (whether the thread is collecting or not), it actually returns: 0: not collecting 1: in the jump pad, before the relocated instruction 2: in the jump pad, at or after the relocated instruction To avoid confusion, I think it would be nice to make it return an enum. If you can help find a shorter but still relavant name, it would be awesome. Otherwise, we'll go with that, fast_tpoint_collect_result, which is at least consistent with the existing fast_tpoint_collect_status. gdb/gdbserver/ChangeLog: * tracepoint.h (enum class fast_tpoint_collect_result): New enumeration. (fast_tracepoint_collecting): Change return type to fast_tpoint_collect_result. * tracepoint.c (fast_tracepoint_collecting): Likewise. * linux-low.h: Include tracepoint.h. (struct lwp_info) <collecting_fast_tracepoint>: Change type to fast_tpoint_collect_result. * linux-low.c (handle_tracepoints): Adjust. (linux_fast_tracepoint_collecting): Change return type to fast_tpoint_collect_result. (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered, linux_wait_1, stuck_in_jump_pad_callback, lwp_signal_can_be_delivered, linux_resume_one_lwp_throw, proceed_one_lwp): Adjust to type change.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r--gdb/gdbserver/linux-low.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 6328da0..2bf7e7c 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -26,6 +26,7 @@
/* Included for ptrace type definitions. */
#include "nat/linux-ptrace.h"
#include "target/waitstatus.h" /* For enum target_stop_reason. */
+#include "tracepoint.h"
#define PTRACE_XFER_TYPE long
@@ -353,12 +354,11 @@ struct lwp_info
and then processed and cleared in linux_resume_one_lwp. */
struct thread_resume *resume;
- /* True if it is known that this lwp is presently collecting a fast
- tracepoint (it is in the jump pad or in some code that will
- return to the jump pad. Normally, we won't care about this, but
- we will if a signal arrives to this lwp while it is
- collecting. */
- int collecting_fast_tracepoint;
+ /* Information bout this lwp's fast tracepoint collection status (is it
+ currently stopped in the jump pad, and if so, before or at/after the
+ relocated instruction). Normally, we won't care about this, but we will
+ 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