Rizin
unix-like reverse engineering framework and cli tools
rz_print.h File Reference
#include "rz_types.h"
#include "rz_cons.h"
#include "rz_bind.h"
#include "rz_io.h"
#include "rz_reg.h"
#include <rz_util/rz_strbuf.h>

Go to the source code of this file.

Classes

struct  RzAsmToken
 A token of an asm string holding meta data. More...
 
struct  RzAsmTokenString
 An tokenized asm string. More...
 
struct  RzAsmParseParam
 
struct  RzAsmTokenPattern
 Pattern for a asm string token. More...
 
struct  RzPrintAsmColorOpts
 Holds certain options to alter the colorizing of asm strings. More...
 
struct  rz_print_zoom_t
 
struct  rz_print_t
 

Macros

#define RZ_PRINT_FLAGS_COLOR   0x00000001
 
#define RZ_PRINT_FLAGS_ADDRMOD   0x00000002
 
#define RZ_PRINT_FLAGS_CURSOR   0x00000004
 
#define RZ_PRINT_FLAGS_HEADER   0x00000008
 
#define RZ_PRINT_FLAGS_SPARSE   0x00000010
 
#define RZ_PRINT_FLAGS_SEGOFF   0x00000020
 
#define RZ_PRINT_FLAGS_OFFSET   0x00000040
 
#define RZ_PRINT_FLAGS_REFS   0x00000080
 
#define RZ_PRINT_FLAGS_DIFFOUT   0x00000100 /* only show different rows in `cc` hexdiffing */
 
#define RZ_PRINT_FLAGS_ADDRDEC   0x00000200
 
#define RZ_PRINT_FLAGS_COMMENT   0x00000400
 
#define RZ_PRINT_FLAGS_COMPACT   0x00000800
 
#define RZ_PRINT_FLAGS_NONHEX   0x00001000
 
#define RZ_PRINT_FLAGS_SECSUB   0x00002000
 
#define RZ_PRINT_FLAGS_RAINBOW   0x00004000
 
#define RZ_PRINT_FLAGS_HDROFF   0x00008000
 
#define RZ_PRINT_FLAGS_STYLE   0x00010000
 
#define RZ_PRINT_FLAGS_NONASCII   0x00020000
 
#define RZ_PRINT_FLAGS_ALIGN   0x00040000
 
#define RZ_PRINT_FLAGS_UNALLOC   0x00080000
 
#define RZ_PRINT_FLAGS_BGFILL   0x00100000
 
#define RZ_PRINT_FLAGS_SECTION   0x00200000
 

Typedefs

typedef const char *(* RzPrintNameCallback) (void *user, ut64 addr)
 
typedef int(* RzPrintSizeCallback) (void *user, ut64 addr)
 
typedef char *(* RzPrintCommentCallback) (void *user, ut64 addr)
 
typedef const char *(* RzPrintSectionGet) (void *user, ut64 addr)
 
typedef const char *(* RzPrintColorFor) (void *user, ut64 addr, bool verbose)
 
typedef char *(* RzPrintHasRefs) (void *user, ut64 addr, int mode)
 
typedef struct rz_print_zoom_t RzPrintZoom
 
typedef struct rz_print_t RzPrint
 

Enumerations

enum  RzAsmTokenType {
  RZ_ASM_TOKEN_UNKNOWN = 0 , RZ_ASM_TOKEN_MNEMONIC , RZ_ASM_TOKEN_OPERATOR , RZ_ASM_TOKEN_NUMBER ,
  RZ_ASM_TOKEN_REGISTER , RZ_ASM_TOKEN_SEPARATOR , RZ_ASM_TOKEN_META , RZ_ASM_TOKEN_LAST
}
 

Macro Definition Documentation

◆ RZ_PRINT_FLAGS_ADDRDEC

#define RZ_PRINT_FLAGS_ADDRDEC   0x00000200

Definition at line 24 of file rz_print.h.

◆ RZ_PRINT_FLAGS_ADDRMOD

#define RZ_PRINT_FLAGS_ADDRMOD   0x00000002

Definition at line 16 of file rz_print.h.

◆ RZ_PRINT_FLAGS_ALIGN

#define RZ_PRINT_FLAGS_ALIGN   0x00040000

Definition at line 33 of file rz_print.h.

◆ RZ_PRINT_FLAGS_BGFILL

#define RZ_PRINT_FLAGS_BGFILL   0x00100000

Definition at line 35 of file rz_print.h.

◆ RZ_PRINT_FLAGS_COLOR

#define RZ_PRINT_FLAGS_COLOR   0x00000001

Definition at line 15 of file rz_print.h.

◆ RZ_PRINT_FLAGS_COMMENT

#define RZ_PRINT_FLAGS_COMMENT   0x00000400

Definition at line 25 of file rz_print.h.

◆ RZ_PRINT_FLAGS_COMPACT

#define RZ_PRINT_FLAGS_COMPACT   0x00000800

Definition at line 26 of file rz_print.h.

◆ RZ_PRINT_FLAGS_CURSOR

#define RZ_PRINT_FLAGS_CURSOR   0x00000004

Definition at line 17 of file rz_print.h.

◆ RZ_PRINT_FLAGS_DIFFOUT

#define RZ_PRINT_FLAGS_DIFFOUT   0x00000100 /* only show different rows in `cc` hexdiffing */

Definition at line 23 of file rz_print.h.

◆ RZ_PRINT_FLAGS_HDROFF

#define RZ_PRINT_FLAGS_HDROFF   0x00008000

Definition at line 30 of file rz_print.h.

◆ RZ_PRINT_FLAGS_HEADER

#define RZ_PRINT_FLAGS_HEADER   0x00000008

Definition at line 18 of file rz_print.h.

◆ RZ_PRINT_FLAGS_NONASCII

#define RZ_PRINT_FLAGS_NONASCII   0x00020000

Definition at line 32 of file rz_print.h.

◆ RZ_PRINT_FLAGS_NONHEX

#define RZ_PRINT_FLAGS_NONHEX   0x00001000

Definition at line 27 of file rz_print.h.

◆ RZ_PRINT_FLAGS_OFFSET

#define RZ_PRINT_FLAGS_OFFSET   0x00000040

Definition at line 21 of file rz_print.h.

◆ RZ_PRINT_FLAGS_RAINBOW

#define RZ_PRINT_FLAGS_RAINBOW   0x00004000

Definition at line 29 of file rz_print.h.

◆ RZ_PRINT_FLAGS_REFS

#define RZ_PRINT_FLAGS_REFS   0x00000080

Definition at line 22 of file rz_print.h.

◆ RZ_PRINT_FLAGS_SECSUB

#define RZ_PRINT_FLAGS_SECSUB   0x00002000

Definition at line 28 of file rz_print.h.

◆ RZ_PRINT_FLAGS_SECTION

#define RZ_PRINT_FLAGS_SECTION   0x00200000

Definition at line 36 of file rz_print.h.

◆ RZ_PRINT_FLAGS_SEGOFF

#define RZ_PRINT_FLAGS_SEGOFF   0x00000020

Definition at line 20 of file rz_print.h.

◆ RZ_PRINT_FLAGS_SPARSE

#define RZ_PRINT_FLAGS_SPARSE   0x00000010

Definition at line 19 of file rz_print.h.

◆ RZ_PRINT_FLAGS_STYLE

#define RZ_PRINT_FLAGS_STYLE   0x00010000

Definition at line 31 of file rz_print.h.

◆ RZ_PRINT_FLAGS_UNALLOC

#define RZ_PRINT_FLAGS_UNALLOC   0x00080000

Definition at line 34 of file rz_print.h.

Typedef Documentation

◆ RzPrint

typedef struct rz_print_t RzPrint

◆ RzPrintColorFor

typedef const char*(* RzPrintColorFor) (void *user, ut64 addr, bool verbose)

Definition at line 42 of file rz_print.h.

◆ RzPrintCommentCallback

typedef char*(* RzPrintCommentCallback) (void *user, ut64 addr)

Definition at line 40 of file rz_print.h.

◆ RzPrintHasRefs

typedef char*(* RzPrintHasRefs) (void *user, ut64 addr, int mode)

Definition at line 43 of file rz_print.h.

◆ RzPrintNameCallback

typedef const char*(* RzPrintNameCallback) (void *user, ut64 addr)

Definition at line 38 of file rz_print.h.

◆ RzPrintSectionGet

typedef const char*(* RzPrintSectionGet) (void *user, ut64 addr)

Definition at line 41 of file rz_print.h.

◆ RzPrintSizeCallback

typedef int(* RzPrintSizeCallback) (void *user, ut64 addr)

Definition at line 39 of file rz_print.h.

◆ RzPrintZoom

typedef struct rz_print_zoom_t RzPrintZoom

Enumeration Type Documentation

◆ RzAsmTokenType

Enumerator
RZ_ASM_TOKEN_UNKNOWN 
RZ_ASM_TOKEN_MNEMONIC 
RZ_ASM_TOKEN_OPERATOR 
RZ_ASM_TOKEN_NUMBER 
RZ_ASM_TOKEN_REGISTER 
RZ_ASM_TOKEN_SEPARATOR 
RZ_ASM_TOKEN_META 
RZ_ASM_TOKEN_LAST 

Definition at line 45 of file rz_print.h.

45  {
46  RZ_ASM_TOKEN_UNKNOWN = 0, //< Does not fit to any token below.
47  RZ_ASM_TOKEN_MNEMONIC, //< Asm mnemonics like: mov, push, lea...
48  RZ_ASM_TOKEN_OPERATOR, //< Arithmetic operators: +,-,<< etc.
49  RZ_ASM_TOKEN_NUMBER, //< Numbers
50  RZ_ASM_TOKEN_REGISTER, //< Registers
51  RZ_ASM_TOKEN_SEPARATOR, //< Brackets, comma etc.
52  RZ_ASM_TOKEN_META, //< Meta information (e.g Hexagon packet prefix, ARM & Hexagon number prefix).
53 
RzAsmTokenType
Definition: rz_print.h:45
@ RZ_ASM_TOKEN_MNEMONIC
Definition: rz_print.h:47
@ RZ_ASM_TOKEN_REGISTER
Definition: rz_print.h:50
@ RZ_ASM_TOKEN_OPERATOR
Definition: rz_print.h:48
@ RZ_ASM_TOKEN_META
Definition: rz_print.h:52
@ RZ_ASM_TOKEN_NUMBER
Definition: rz_print.h:49
@ RZ_ASM_TOKEN_SEPARATOR
Definition: rz_print.h:51
@ RZ_ASM_TOKEN_UNKNOWN
Definition: rz_print.h:46
@ RZ_ASM_TOKEN_LAST
Definition: rz_print.h:54