X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fgdbserver%2Ftracepoint.h;h=9560cdf89a37408c297b1ae34121de8e0376c307;hb=4c5aa8e0b1b4439f73ef1f82344e408b989f85df;hp=e30f4f70be17a612177e2bf65fb968c3208560d3;hpb=ae91f6253926e4dadebcae90772f4f5a5bd06056;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h index e30f4f70be..9560cdf89a 100644 --- a/gdb/gdbserver/tracepoint.h +++ b/gdb/gdbserver/tracepoint.h @@ -1,5 +1,5 @@ /* Tracepoint code for remote server for GDB. - Copyright (C) 1993-2016 Free Software Foundation, Inc. + Copyright (C) 1993-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef TRACEPOINT_H -#define TRACEPOINT_H +#ifndef GDBSERVER_TRACEPOINT_H +#define GDBSERVER_TRACEPOINT_H /* Size for a small buffer to report problems from the in-process agent back to GDBserver. */ @@ -83,8 +83,6 @@ int tracepoint_was_hit (struct thread_info *tinfo, CORE_ADDR stop_pc); void release_while_stepping_state_list (struct thread_info *tinfo); -extern int current_traceframe; - int in_readonly_region (CORE_ADDR addr, ULONGEST length); int traceframe_read_mem (int tfnum, CORE_ADDR addr, unsigned char *buf, ULONGEST length, @@ -115,9 +113,25 @@ struct fast_tpoint_collect_status CORE_ADDR adjusted_insn_addr_end; }; -int fast_tracepoint_collecting (CORE_ADDR thread_area, - CORE_ADDR stop_pc, - struct fast_tpoint_collect_status *status); +/* The possible states a thread can be in, related to the collection of fast + tracepoint. */ + +enum class fast_tpoint_collect_result +{ + /* Not collecting a fast tracepoint. */ + not_collecting, + + /* In the jump pad, but before the relocated instruction. */ + before_insn, + + /* In the jump pad, but at (or after) the relocated instruction. */ + at_insn, +}; + +fast_tpoint_collect_result fast_tracepoint_collecting + (CORE_ADDR thread_area, CORE_ADDR stop_pc, + struct fast_tpoint_collect_status *status); + void force_unlock_trace_buffer (void); int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc); @@ -132,6 +146,10 @@ void supply_static_tracepoint_registers (struct regcache *regcache, CORE_ADDR pc); void set_trampoline_buffer_space (CORE_ADDR begin, CORE_ADDR end, char *errmsg); +void *alloc_jump_pad_buffer (size_t size); +#ifndef HAVE_GETAUXVAL +unsigned long getauxval (unsigned long type); +#endif #else void stop_tracing (void); @@ -163,8 +181,7 @@ int agent_mem_read_string (struct eval_agent_expr_context *ctx, /* The prototype the get_raw_reg function in the IPA. Each arch's bytecode compiler emits calls to this function. */ -IP_AGENT_EXPORT_FUNC ULONGEST gdb_agent_get_raw_reg - (const unsigned char *raw_regs, int regnum); +ULONGEST get_raw_reg (const unsigned char *raw_regs, int regnum); /* Returns the address of the get_raw_reg function in the IPA. */ CORE_ADDR get_raw_reg_func_addr (void); @@ -175,4 +192,4 @@ CORE_ADDR get_get_tsv_func_addr (void); function in the IPA. */ CORE_ADDR get_set_tsv_func_addr (void); -#endif /* TRACEPOINT_H */ +#endif /* GDBSERVER_TRACEPOINT_H */