229d26f Add enum for result of fast_tracepoint_collecting

Authored and Committed by Simon Marchi 6 years ago
    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.
    
        
file modified
+18 -0
file modified
+39 -26
file modified
+6 -6
file modified
+9 -9
file modified
+19 -3