Rizin
unix-like reverse engineering framework and cli tools
rz_annotated_code.h
Go to the documentation of this file.
1 
2 #ifndef RZ_ANNOTATEDCODE_H
3 #define RZ_ANNOTATEDCODE_H
4 
5 // #include <rz_core.h>
6 #include <rz_types.h>
7 #include <rz_vector.h>
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
23 
33  // ...
35 
39 typedef struct rz_code_annotation_t {
40  size_t start;
41  size_t end;
43  union {
47  struct {
49  } offset;
54  struct {
57 
62  struct {
63  char *name;
64  ut64 offset;
66 
71  struct {
72  char *name;
74  };
79 typedef struct rz_annotated_code_t {
80  char *code;
83 
111 RZ_API void rz_annotation_free(void *e, void *user);
175 
176 #ifdef __cplusplus
177 }
178 #endif
179 
180 #endif // RZ_ANNOTATEDCODE_H
#define e(frag)
#define RZ_API
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
Definition: sflib.h:133
voidpf uLong offset
Definition: ioapi.h:144
rz_code_annotation_type_t
@ RZ_CODE_ANNOTATION_TYPE_GLOBAL_VARIABLE
@ RZ_CODE_ANNOTATION_TYPE_FUNCTION_PARAMETER
@ RZ_CODE_ANNOTATION_TYPE_CONSTANT_VARIABLE
@ RZ_CODE_ANNOTATION_TYPE_LOCAL_VARIABLE
@ RZ_CODE_ANNOTATION_TYPE_OFFSET
@ RZ_CODE_ANNOTATION_TYPE_SYNTAX_HIGHLIGHT
@ RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME
rz_syntax_highlight_type_t
@ RZ_SYNTAX_HIGHLIGHT_TYPE_LOCAL_VARIABLE
@ RZ_SYNTAX_HIGHLIGHT_TYPE_FUNCTION_NAME
@ RZ_SYNTAX_HIGHLIGHT_TYPE_CONSTANT_VARIABLE
@ RZ_SYNTAX_HIGHLIGHT_TYPE_KEYWORD
@ RZ_SYNTAX_HIGHLIGHT_TYPE_DATATYPE
@ RZ_SYNTAX_HIGHLIGHT_TYPE_FUNCTION_PARAMETER
@ RZ_SYNTAX_HIGHLIGHT_TYPE_GLOBAL_VARIABLE
@ RZ_SYNTAX_HIGHLIGHT_TYPE_COMMENT
RZ_API bool rz_annotation_is_reference(RzCodeAnnotation *annotation)
Checks if the specified annotation is a reference.
RZ_API void rz_annotation_free(void *e, void *user)
Deallocates dynamically allocated memory for the specified annotation.
RZ_API RzAnnotatedCode * rz_annotated_code_new(char *code)
Create and initialize a RzAnnotatedCode structure and returns its pointer.
Definition: annotated_code.c:8
RZ_API RzVector * rz_annotated_code_line_offsets(RzAnnotatedCode *code)
Returns the offset for every line of decompiled code in the specified RzAnnotatedCode.
RZ_API bool rz_annotation_is_variable(RzCodeAnnotation *annotation)
Checks if the specified annotation is a function variable.
struct rz_annotated_code_t RzAnnotatedCode
This structure contains the decompiled code and all the annotations for the decompiled code.
RZ_API RzPVector * rz_annotated_code_annotations_range(RzAnnotatedCode *code, size_t start, size_t end)
Returns all annotations with range that overlap with the specified range.
enum rz_syntax_highlight_type_t RSyntaxHighlightType
RZ_API void rz_annotated_code_add_annotation(RzAnnotatedCode *code, RzCodeAnnotation *annotation)
Inserts the specified annotation into the list of annotations in the specified RzAnnotatedCode.
RZ_API void rz_annotated_code_free(RzAnnotatedCode *code)
Deallocates the dynamically allocated memory for the specified RzAnnotatedCode.
RZ_API RzPVector * rz_annotated_code_annotations_in(RzAnnotatedCode *code, size_t offset)
Returns all annotations with range that contains the given offset.
struct rz_code_annotation_t RzCodeAnnotation
Annotations for the decompiled code are represented using this structure.
enum rz_code_annotation_type_t RzCodeAnnotationType
Definition: inftree9.h:24
This structure contains the decompiled code and all the annotations for the decompiled code.
Annotations for the decompiled code are represented using this structure.
RzCodeAnnotationType type
struct rz_code_annotation_t::@297::@300 syntax_highlight
RSyntaxHighlightType type
struct rz_code_annotation_t::@297::@301 reference
struct rz_code_annotation_t::@297::@302 variable
ut64(WINAPI *w32_GetEnabledXStateFeatures)()