OpenOCD
oocd_capstone.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef OPENOCD_TARGET_WRAP_CAPSTONE_H
4 #define OPENOCD_TARGET_WRAP_CAPSTONE_H
5 
6 #include <stdint.h>
7 
8 struct command_invocation;
9 struct target;
10 
11 #ifdef HAVE_CAPSTONE
12 
15  uint64_t address, unsigned int count, const char *insn_set);
16 
17 #else /* HAVE_CAPSTONE */
18 
19 #include <helper/command.h>
20 #include <helper/log.h>
21 
22 static inline
24 {
25  command_print(cmd, "Capstone library not present");
26  return ERROR_NOT_IMPLEMENTED;
27 }
28 
29 static inline
31  uint64_t address, unsigned int count, const char *insn_set)
32 {
33  command_print(cmd, "Capstone library not present");
34  return ERROR_NOT_IMPLEMENTED;
35 }
36 
37 #endif /* HAVE_CAPSTONE */
38 
39 #endif /* OPENOCD_TARGET_WRAP_CAPSTONE_H */
void command_print(struct command_invocation *cmd, const char *format,...)
Definition: command.c:389
uint32_t address
Starting address. Sector aligned.
Definition: dw-spi-helper.h:0
#define ERROR_NOT_IMPLEMENTED
Definition: log.h:192
static int oocd_cs_disassemble(struct command_invocation *cmd, struct target *target, uint64_t address, unsigned int count, const char *insn_set)
Definition: oocd_capstone.h:30
static int oocd_cs_list_insn_types(struct command_invocation *cmd)
Definition: oocd_capstone.h:23
When run_command is called, a new instance will be created on the stack, filled with the proper value...
Definition: command.h:76
Definition: target.h:119
uint8_t cmd
Definition: vdebug.c:1
uint8_t count[4]
Definition: vdebug.c:22