19 pj_k(pj,
"annotations");
28 switch (annotation->
type) {
30 pj_ks(pj,
"type",
"offset");
34 pj_ks(pj,
"type",
"function_name");
39 pj_ks(pj,
"type",
"global_variable");
43 pj_ks(pj,
"type",
"constant_variable");
47 pj_ks(pj,
"type",
"local_variable");
51 pj_ks(pj,
"type",
"function_parameter");
55 pj_ks(pj,
"type",
"syntax_highlight");
65 type_str =
"datatype";
68 type_str =
"function_name";
71 type_str =
"function_parameter";
74 type_str =
"local_variable";
77 type_str =
"constant_variable";
80 type_str =
"global_variable";
84 pj_ks(pj,
"syntax_highlight", type_str);
97 #define PALETTE(x) (cons && cons->context->pal.x) ? cons->context->pal.x
98 #define PRINT_COLOR(x) \
100 if (cons->context->color_mode) { \
101 rz_cons_printf("%s", (x)); \
109 static const char *fmt[9] = {
146 if (
code->annotations.len == 0) {
153 size_t len = strlen(
code->code);
155 size_t offset_width = 0;
168 if (offset_width < 4) {
210 for (; cur < annotation->
start && cur <
len; cur++) {
213 if (line_offsets && (cur == 0 ||
code->code[cur - 1] ==
'\n')) {
215 if (line_idx < line_offsets->
len) {
227 for (; cur < annotation->
end && cur <
len; cur++) {
230 if (line_offsets && (cur == 0 ||
code->code[cur - 1] ==
'\n')) {
232 if (line_idx < line_offsets->
len) {
246 for (; cur <
len; cur++) {
249 if (line_offsets && (cur == 0 ||
code->code[cur - 1] ==
'\n')) {
251 if (line_idx < line_offsets->
len) {
265 annotation->
end - annotation->
start);
273 HtUP *ht = ht_up_new0();
281 if (annotation->
end - annotation->
start < prev_annot->
end - prev_annot->
start) {
285 ht_up_update(ht, annotation->
offset.offset, annotation);
RZ_API void rz_core_annotated_code_print_json(RzAnnotatedCode *code)
RZ_API void rz_core_annotated_code_print(RzAnnotatedCode *code, RzVector *line_offsets)
static void print_offset_in_binary_line_bar(RzAnnotatedCode *code, ut64 offset, size_t width)
RZ_API void rz_core_annotated_code_print_comment_cmds(RzAnnotatedCode *code)
static bool foreach_offset_annotation(void *user, const ut64 offset, const void *val)
RZ_API RzCons * rz_cons_singleton(void)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API void Ht_() free(HtName_(Ht) *ht)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
@ 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_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 char * rz_base64_encode_dyn(const ut8 *bin, size_t sz)
RZ_API PJ * pj_k(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
static void * rz_vector_index_ptr(RzVector *vec, size_t index)
#define rz_vector_foreach(vec, it)
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
struct rz_code_annotation_t::@297::@301 reference
struct rz_code_annotation_t::@297::@302 variable
ut64(WINAPI *w32_GetEnabledXStateFeatures)()