Rizin
unix-like reverse engineering framework and cli tools
rz_flag.h File Reference
#include <rz_types.h>
#include <rz_util.h>
#include <rz_list.h>
#include <rz_skiplist.h>
#include <rz_util/rz_serialize.h>

Go to the source code of this file.

Classes

struct  rz_flag_zone_item_t
 
struct  rz_flags_at_offset_t
 
struct  rz_flag_item_t
 
struct  rz_flag_t
 
struct  rz_flag_bind_t
 

Macros

#define RZ_FLAG_NAME_SIZE   512
 
#define rz_flag_bind_init(x)   memset(&x, 0, sizeof(x))
 

Typedefs

typedef struct rz_flag_zone_item_t RzFlagZoneItem
 
typedef struct rz_flags_at_offset_t RzFlagsAtOffset
 
typedef struct rz_flag_item_t RzFlagItem
 
typedef struct rz_flag_t RzFlag
 
typedef bool(* RzFlagExistAt) (RzFlag *f, const char *flag_prefix, ut16 fp_size, ut64 off)
 
typedef RzFlagItem *(* RzFlagGet) (RzFlag *f, const char *name)
 
typedef RzFlagItem *(* RzFlagGetAtAddr) (RzFlag *f, ut64)
 
typedef RzFlagItem *(* RzFlagGetAt) (RzFlag *f, ut64 addr, bool closest)
 
typedef RzFlagItem *(* RzFlagGetAtBySpaces) (RzFlag *f, ut64 off,...)
 
typedef const RzList *(* RzFlagGetList) (RzFlag *f, ut64 addr)
 
typedef RzFlagItem *(* RzFlagSet) (RzFlag *f, const char *name, ut64 addr, ut32 size)
 
typedef bool(* RzFlagUnset) (RzFlag *f, RzFlagItem *item)
 
typedef bool(* RzFlagUnsetName) (RzFlag *f, const char *name)
 
typedef bool(* RzFlagUnsetOff) (RzFlag *f, ut64 addr)
 
typedef RzSpace *(* RzFlagSetSpace) (RzFlag *f, const char *name)
 
typedef bool(* RzFlagPopSpace) (RzFlag *f)
 
typedef bool(* RzFlagPushSpace) (RzFlag *f, const char *name)
 
typedef int(* RzFlagRename) (RzFlag *f, RzFlagItem *item, const char *name)
 
typedef bool(* RzFlagItemCb) (RzFlagItem *fi, void *user)
 
typedef struct rz_flag_bind_t RzFlagBind
 

Functions

 RZ_LIB_VERSION_HEADER (rz_flag)
 
RZ_API void rz_flag_bind (RzFlag *io, RzFlagBind *bnd)
 

Macro Definition Documentation

◆ rz_flag_bind_init

#define rz_flag_bind_init (   x)    memset(&x, 0, sizeof(x))

Definition at line 94 of file rz_flag.h.

◆ RZ_FLAG_NAME_SIZE

#define RZ_FLAG_NAME_SIZE   512

Definition at line 17 of file rz_flag.h.

Typedef Documentation

◆ RzFlag

typedef struct rz_flag_t RzFlag

◆ RzFlagBind

typedef struct rz_flag_bind_t RzFlagBind

◆ RzFlagExistAt

typedef bool(* RzFlagExistAt) (RzFlag *f, const char *flag_prefix, ut16 fp_size, ut64 off)

Definition at line 59 of file rz_flag.h.

◆ RzFlagGet

typedef RzFlagItem*(* RzFlagGet) (RzFlag *f, const char *name)

Definition at line 60 of file rz_flag.h.

◆ RzFlagGetAt

typedef RzFlagItem*(* RzFlagGetAt) (RzFlag *f, ut64 addr, bool closest)

Definition at line 62 of file rz_flag.h.

◆ RzFlagGetAtAddr

typedef RzFlagItem*(* RzFlagGetAtAddr) (RzFlag *f, ut64)

Definition at line 61 of file rz_flag.h.

◆ RzFlagGetAtBySpaces

typedef RzFlagItem*(* RzFlagGetAtBySpaces) (RzFlag *f, ut64 off,...)

Definition at line 63 of file rz_flag.h.

◆ RzFlagGetList

typedef const RzList*(* RzFlagGetList) (RzFlag *f, ut64 addr)

Definition at line 64 of file rz_flag.h.

◆ RzFlagItem

typedef struct rz_flag_item_t RzFlagItem

◆ RzFlagItemCb

typedef bool(* RzFlagItemCb) (RzFlagItem *fi, void *user)

Definition at line 74 of file rz_flag.h.

◆ RzFlagPopSpace

typedef bool(* RzFlagPopSpace) (RzFlag *f)

Definition at line 70 of file rz_flag.h.

◆ RzFlagPushSpace

typedef bool(* RzFlagPushSpace) (RzFlag *f, const char *name)

Definition at line 71 of file rz_flag.h.

◆ RzFlagRename

typedef int(* RzFlagRename) (RzFlag *f, RzFlagItem *item, const char *name)

Definition at line 72 of file rz_flag.h.

◆ RzFlagsAtOffset

◆ RzFlagSet

typedef RzFlagItem*(* RzFlagSet) (RzFlag *f, const char *name, ut64 addr, ut32 size)

Definition at line 65 of file rz_flag.h.

◆ RzFlagSetSpace

typedef RzSpace*(* RzFlagSetSpace) (RzFlag *f, const char *name)

Definition at line 69 of file rz_flag.h.

◆ RzFlagUnset

typedef bool(* RzFlagUnset) (RzFlag *f, RzFlagItem *item)

Definition at line 66 of file rz_flag.h.

◆ RzFlagUnsetName

typedef bool(* RzFlagUnsetName) (RzFlag *f, const char *name)

Definition at line 67 of file rz_flag.h.

◆ RzFlagUnsetOff

typedef bool(* RzFlagUnsetOff) (RzFlag *f, ut64 addr)

Definition at line 68 of file rz_flag.h.

◆ RzFlagZoneItem

Function Documentation

◆ rz_flag_bind()

RZ_API void rz_flag_bind ( RzFlag io,
RzFlagBind bnd 
)

Definition at line 752 of file flag.c.

752  {
753  rz_return_if_fail(f && fb);
754  fb->f = f;
755  fb->exist_at = rz_flag_exist_at;
756  fb->get = rz_flag_get;
757  fb->get_at = rz_flag_get_at;
758  fb->get_at_by_spaces = rz_flag_get_by_spaces;
759  fb->get_list = rz_flag_get_list;
760  fb->set = rz_flag_set;
761  fb->unset = rz_flag_unset;
762  fb->unset_name = rz_flag_unset_name;
763  fb->unset_off = rz_flag_unset_off;
764  fb->set_fs = rz_flag_space_set;
765  fb->push_fs = rz_flag_space_push;
766  fb->pop_fs = rz_flag_space_pop;
767  fb->rename = rz_flag_rename;
768 }
RZ_API int rz_flag_rename(RzFlag *f, RzFlagItem *item, const char *name)
Definition: flag.c:587
RZ_API const RzList * rz_flag_get_list(RzFlag *f, ut64 off)
Definition: flag.c:475
RZ_API RzFlagItem * rz_flag_get_at(RzFlag *f, ut64 off, bool closest)
Definition: flag.c:404
RZ_API RzFlagItem * rz_flag_get(RzFlag *f, const char *name)
Definition: flag.c:310
RZ_API RzFlagItem * rz_flag_set(RzFlag *f, const char *name, ut64 off, ut32 size)
Definition: flag.c:521
RZ_API bool rz_flag_exist_at(RzFlag *f, const char *flag_prefix, ut16 fp_size, ut64 off)
Definition: flag.c:293
RZ_API bool rz_flag_unset(RzFlag *f, RzFlagItem *item)
Definition: flag.c:597
RZ_API bool rz_flag_unset_name(RzFlag *f, const char *name)
Definition: flag.c:670
RZ_API RzFlagItem * rz_flag_get_by_spaces(RzFlag *f, ut64 off,...)
Definition: flag.c:326
RZ_API bool rz_flag_unset_off(RzFlag *f, ut64 off)
Definition: flag.c:608
#define rz_return_if_fail(expr)
Definition: rz_assert.h:100
#define f(i)
Definition: sha256.c:46

References rz_flag_bind_t::exist_at, rz_flag_bind_t::f, f, rz_flag_bind_t::get, rz_flag_bind_t::get_at, rz_flag_bind_t::get_at_by_spaces, rz_flag_bind_t::get_list, rz_flag_bind_t::pop_fs, rz_flag_bind_t::push_fs, rz_flag_bind_t::rename, rz_flag_exist_at(), rz_flag_get(), rz_flag_get_at(), rz_flag_get_by_spaces(), rz_flag_get_list(), rz_flag_rename(), rz_flag_set(), rz_flag_unset(), rz_flag_unset_name(), rz_flag_unset_off(), rz_return_if_fail, rz_flag_bind_t::set, rz_flag_bind_t::set_fs, rz_flag_bind_t::unset, rz_flag_bind_t::unset_name, and rz_flag_bind_t::unset_off.

Referenced by rz_core_init().

◆ RZ_LIB_VERSION_HEADER()

RZ_LIB_VERSION_HEADER ( rz_flag  )