+/* Functions from tracepoint.c */
+
+int in_process_agent_loaded (void);
+
+void initialize_tracepoint (void);
+
+extern int tracing;
+extern int disconnected_tracing;
+
+void tracepoint_look_up_symbols (void);
+
+void stop_tracing (void);
+
+int handle_tracepoint_general_set (char *own_buf);
+int handle_tracepoint_query (char *own_buf);
+
+int tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc);
+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,
+ ULONGEST *nbytes);
+int fetch_traceframe_registers (int tfnum,
+ struct regcache *regcache,
+ int regnum);
+
+int traceframe_read_sdata (int tfnum, ULONGEST offset,
+ unsigned char *buf, ULONGEST length,
+ ULONGEST *nbytes);
+
+/* If a thread is determined to be collecting a fast tracepoint, this
+ structure holds the collect status. */
+
+struct fast_tpoint_collect_status
+{
+ /* The tracepoint that is presently being collected. */
+ int tpoint_num;
+ CORE_ADDR tpoint_addr;
+
+ /* The address range in the jump pad of where the original
+ instruction the tracepoint jump was inserted was relocated
+ to. */
+ CORE_ADDR adjusted_insn_addr;
+ CORE_ADDR adjusted_insn_addr_end;
+};
+
+int 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);
+
+#ifdef IN_PROCESS_AGENT
+void initialize_low_tracepoint (void);
+void supply_fast_tracepoint_registers (struct regcache *regcache,
+ const unsigned char *regs);
+void supply_static_tracepoint_registers (struct regcache *regcache,
+ const unsigned char *regs,
+ CORE_ADDR pc);
+#else
+void stop_tracing (void);
+#endif
+
+/* Bytecode compilation function vector. */
+
+struct emit_ops
+{
+ void (*emit_prologue) (void);
+ void (*emit_epilogue) (void);
+ void (*emit_add) (void);
+ void (*emit_sub) (void);
+ void (*emit_mul) (void);
+ void (*emit_lsh) (void);
+ void (*emit_rsh_signed) (void);
+ void (*emit_rsh_unsigned) (void);
+ void (*emit_ext) (int arg);
+ void (*emit_log_not) (void);
+ void (*emit_bit_and) (void);
+ void (*emit_bit_or) (void);
+ void (*emit_bit_xor) (void);
+ void (*emit_bit_not) (void);
+ void (*emit_equal) (void);
+ void (*emit_less_signed) (void);
+ void (*emit_less_unsigned) (void);
+ void (*emit_ref) (int size);
+ void (*emit_if_goto) (int *offset_p, int *size_p);
+ void (*emit_goto) (int *offset_p, int *size_p);
+ void (*write_goto_address) (CORE_ADDR from, CORE_ADDR to, int size);
+ void (*emit_const) (LONGEST num);
+ void (*emit_call) (CORE_ADDR fn);
+ void (*emit_reg) (int reg);
+ void (*emit_pop) (void);
+ void (*emit_stack_flush) (void);
+ void (*emit_zero_ext) (int arg);
+ void (*emit_swap) (void);
+ void (*emit_stack_adjust) (int n);
+
+ /* Emit code for a generic function that takes one fixed integer
+ argument and returns a 64-bit int (for instance, tsv getter). */
+ void (*emit_int_call_1) (CORE_ADDR fn, int arg1);
+
+ /* Emit code for a generic function that takes one fixed integer
+ argument and a 64-bit int from the top of the stack, and returns
+ nothing (for instance, tsv setter). */
+ void (*emit_void_call_2) (CORE_ADDR fn, int arg1);
+};
+
+/* Returns the address of the get_raw_reg function in the IPA. */
+CORE_ADDR get_raw_reg_func_addr (void);
+
+CORE_ADDR current_insn_ptr;
+int emit_error;
+