OpenOCD
trace.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Copyright (C) 2007 by Dominic Rath *
5  * Dominic.Rath@gmx.de *
6  ***************************************************************************/
7 
8 #ifndef OPENOCD_TARGET_TRACE_H
9 #define OPENOCD_TARGET_TRACE_H
10 
11 #include "helper/types.h"
12 
13 struct target;
14 struct command_context;
15 
16 struct trace_point {
17  uint32_t address;
18  uint64_t hit_counter;
19 };
20 
21 struct trace {
22  uint32_t num_trace_points;
26  uint32_t *trace_history;
29 };
30 
36 typedef enum trace_status {
37  TRACE_IDLE = 0x0,
43 
44 int trace_point(struct target *target, uint32_t number);
45 int trace_register_commands(struct command_context *cmd_ctx);
46 
47 #define ERROR_TRACE_IMAGE_UNAVAILABLE (-1500)
48 #define ERROR_TRACE_INSTRUCTION_UNAVAILABLE (-1501)
49 
50 #endif /* OPENOCD_TARGET_TRACE_H */
enum esirisc_reg_num number
Definition: esirisc.c:87
Definition: target.h:116
uint32_t address
Definition: trace.h:17
uint64_t hit_counter
Definition: trace.h:18
Definition: trace.h:21
struct trace_point * trace_points
Definition: trace.h:24
uint32_t trace_history_pos
Definition: trace.h:27
uint32_t trace_points_size
Definition: trace.h:23
uint32_t * trace_history
Definition: trace.h:26
uint32_t trace_history_size
Definition: trace.h:25
uint32_t num_trace_points
Definition: trace.h:22
int trace_history_overflowed
Definition: trace.h:28
enum trace_status trace_status_t
trace_status
Definition: trace.h:36
@ TRACE_OVERFLOWED
Definition: trace.h:41
@ TRACE_RUNNING
Definition: trace.h:38
@ TRACE_COMPLETED
Definition: trace.h:40
@ TRACE_TRIGGERED
Definition: trace.h:39
@ TRACE_IDLE
Definition: trace.h:37
int trace_point(struct target *target, uint32_t number)
Definition: trace.c:16
int trace_register_commands(struct command_context *cmd_ctx)
Definition: trace.c:159