18 #define SDB_CDB_MIN_VALUE 1
19 #define SDB_CDB_MAX_VALUE CDB_MAX_VALUE
20 #define SDB_CDB_MIN_KEY 1
21 #define SDB_CDB_MAX_KEY CDB_MAX_KEY
23 #if __WINDOWS__ && !__CYGWIN__
26 #include <sys/types.h>
29 #define ftruncate _chsize
31 extern __attribute__((dllimport))
void *__cdecl _aligned_malloc(
size_t,
size_t);
32 extern __attribute__((dllimport))
void __cdecl _aligned_free(
void *memblock);
33 extern char *
strdup(
const char *);
40 #define SDB_MODE _S_IWRITE | _S_IREAD
49 #define SDB_MAX_PATH 256
50 #define SDB_NUM_BASE 16
51 #define SDB_NUM_BUFSZ 64
53 #define SDB_OPTION_NONE 0
54 #define SDB_OPTION_ALL 0xff
55 #define SDB_OPTION_SYNC (1 << 0)
56 #define SDB_OPTION_NOSTAMP (1 << 1)
57 #define SDB_OPTION_FS (1 << 2)
58 #define SDB_OPTION_JOURNAL (1 << 3)
60 #define SDB_LIST_UNSORTED 0
61 #define SDB_LIST_SORTED 1
342 #define sdb_aforeach(x, y) \
347 x = sdb_anext(x, &next);
348 #define sdb_aforeach_next(x) \
static RzBuffer * create(RzBin *bin, const ut8 *code, int codelen, const ut8 *data, int datalen, RzBinArchOptions *opt)
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
static RzNumCalcValue expr(RzNum *, RzNumCalc *, int)
static static fork const void static count static fd const char const char static newpath const char static path const char path
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 cmd
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 key
static void list(RzEgg *egg)
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
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
static const char struct stat static buf struct stat static buf static vhangup int options
#define RZ_PRINTF_CHECK(fmt, dots)
RZ_API bool sdb_array_prepend_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API bool sdb_dump_dupnext(Sdb *s, char *key, char **value, int *_vlen)
RZ_API char * sdb_anext(char *str, char **next)
struct sdb_diff_t SdbDiff
RZ_API int sdb_array_length(Sdb *s, const char *key)
void(* SdbDiffCallback)(const SdbDiff *diff, void *user)
RZ_API void * sdb_ptr_get(Sdb *db, const char *key, ut32 *cas)
RZ_API ut8 * sdb_decode(const char *in, int *len)
RZ_API void sdb_file(Sdb *s, const char *dir)
RZ_API int sdb_set(Sdb *, const char *key, const char *data, ut32 cas)
RZ_API char * sdb_fmt_tostr(void *stru, const char *fmt)
RZ_API bool sdb_array_append_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_array_size(Sdb *s, const char *key)
RZ_API int sdb_ns_set(Sdb *s, const char *name, Sdb *r)
RZ_API void sdb_ns_free_all(Sdb *s)
RZ_API Sdb * sdb_ns_path(Sdb *s, const char *path, int create)
RZ_API ut8 sdb_hash_byte(const char *s)
RZ_API bool sdb_disk_insert(Sdb *s, const char *key, const char *val)
RZ_API char * sdb_array_get(Sdb *s, const char *key, int idx, ut32 *cas)
RZ_API Sdb * sdb_new(const char *path, const char *file, int lock)
RZ_API char * sdb_querys(Sdb *s, char *buf, size_t len, const char *cmd)
RZ_API int sdb_array_add_sorted_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_ptr_set(Sdb *db, const char *key, void *p, ut32 cas)
RZ_API bool sdb_dump_hasnext(Sdb *s)
RZ_API int sdb_set_owned(Sdb *s, const char *key, char *val, ut32 cas)
RZ_API Sdb * sdb_ns(Sdb *s, const char *name, int create)
RZ_API void sdb_unlock(const char *s)
RZ_API int sdb_array_indexof(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_isempty(Sdb *s)
RZ_API ut64 sdb_array_pop_num(Sdb *s, const char *key, ut32 *cas)
bool(* SdbForeachCallback)(void *user, const char *k, const char *v)
RZ_API ut64 sdb_now(void)
RZ_API int sdb_isnum(const char *s)
RZ_API int sdb_array_add_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_num_add(Sdb *s, const char *key, ut64 v, ut32 cas)
RZ_API bool sdb_bool_get(Sdb *db, const char *str, ut32 *cas)
RZ_API int sdb_array_add_sorted(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API SdbKv * sdb_dump_next(Sdb *s)
RZ_API void sdb_close(Sdb *s)
RZ_API int sdb_array_unset(Sdb *s, const char *key, int n, ut32 cas)
RZ_API void sdb_drain(Sdb *, Sdb *)
RZ_API ut64 sdb_expire_get(Sdb *s, const char *key, ut32 *cas)
RZ_API bool sdb_journal_open(Sdb *s)
RZ_API int sdb_array_insert_num(Sdb *s, const char *key, int idx, ut64 val, ut32 cas)
RZ_API bool sdb_array_prepend(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API char * sdb_aslice(char *out, int from, int to)
RZ_API Sdb * sdb_new0(void)
RZ_API int sdb_num_min(Sdb *s, const char *key, ut64 v, ut32 cas)
RZ_API int sdb_add(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_unhook(Sdb *s, SdbHook h)
RZ_API int sdb_alen(const char *str)
RZ_API char ** sdb_like(Sdb *s, const char *k, const char *v, SdbForeachCallback cb)
RZ_API ut64 sdb_num_dec(Sdb *s, const char *key, ut64 n, ut32 cas)
RZ_API char * sdb_itoa(ut64 n, char *s, int base)
RZ_API int sdb_num_set(Sdb *s, const char *key, ut64 v, ut32 cas)
RZ_API void sdb_setup(Sdb *s, int options)
RZ_API void sdb_ns_lock(Sdb *s, int lock, int depth)
RZ_API int sdb_array_get_idx(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API char ** sdb_fmt_array(const char *list)
RZ_API bool sdb_merge(Sdb *d, Sdb *s)
RZ_API void sdb_encode_raw(char *bout, const ut8 *bin, int len)
RZ_API char * sdb_get(Sdb *, const char *key, ut32 *cas)
RZ_API char * sdb_querysf(Sdb *s, char *buf, size_t buflen, const char *fmt,...)
RZ_API bool sdb_text_save(Sdb *s, const char *file, bool sort)
RZ_API int sdb_unset(Sdb *, const char *key, ut32 cas)
RZ_API ut64 sdb_unow(void)
RZ_API bool sdb_free(Sdb *s)
RZ_API bool sdb_text_load(Sdb *s, const char *file)
RZ_API char * sdb_fmt(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API bool sdb_disk_unlink(Sdb *s)
RZ_API int sdb_hook_call(Sdb *s, const char *k, const char *v)
RZ_API int sdb_queryf(Sdb *s, const char *fmt,...)
RZ_API bool sdb_array_append(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_num_exists(Sdb *, const char *key)
RZ_API int sdb_query(Sdb *s, const char *cmd)
RZ_API bool sdb_match(const char *str, const char *glob)
RZ_API int sdb_num_max(Sdb *s, const char *key, ut64 v, ut32 cas)
RZ_API int sdb_journal_load(Sdb *s)
RZ_API void sdb_array_sort(Sdb *s, const char *key, ut32 cas)
RZ_API int sdb_count(Sdb *s)
RZ_API bool sdb_text_load_buf(Sdb *s, char *buf, size_t sz)
RZ_API int sdb_array_set(Sdb *s, const char *key, int idx, const char *val, ut32 cas)
RZ_API int sdb_decode_raw(ut8 *bout, const char *bin, int len)
RZ_API int sdb_array_add(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_array_push(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API void sdb_reset(Sdb *s)
RZ_API const char * sdb_const_get(Sdb *, const char *key, ut32 *cas)
RZ_API bool sdb_lock(const char *s)
RZ_API SdbList * sdb_foreach_list_filter_user(Sdb *s, SdbForeachCallback filter, bool sorted, void *user)
RZ_API char * sdb_array_compact(char *p)
RZ_API void sdb_copy(Sdb *src, Sdb *dst)
RZ_API int sdb_lock_wait(RZ_UNUSED const char *s)
RZ_API bool sdb_foreach(Sdb *s, SdbForeachCallback cb, void *user)
RZ_API bool sdb_diff(Sdb *a, Sdb *b, SdbDiffCallback cb, void *cb_user)
void(* SdbHook)(Sdb *s, void *user, const char *k, const char *v)
RZ_API bool sdb_stats(Sdb *s, ut32 *disk, ut32 *mem)
RZ_API bool sdb_unlink(Sdb *s)
RZ_API bool sdb_journal_clear(Sdb *s)
RZ_API const char * sdb_type(const char *k)
RZ_API int sdb_fmt_tobin(const char *_str, const char *fmt, void *stru)
RZ_API int sdb_uncat(Sdb *s, const char *key, const char *value, ut32 cas)
RZ_API const char * sdb_const_anext(const char *str)
RZ_API int sdb_array_insert(Sdb *s, const char *key, int idx, const char *val, ut32 cas)
RZ_API void sdb_ns_init(Sdb *s)
RZ_API int sdb_alen_ignore_empty(const char *str)
RZ_API int sdb_bool_set(Sdb *db, const char *str, bool v, ut32 cas)
RZ_API char * sdb_array_pop(Sdb *s, const char *key, ut32 *cas)
RZ_API ut64 sdb_num_get(Sdb *s, const char *key, ut32 *cas)
RZ_API SdbList * sdb_foreach_list_filter(Sdb *s, SdbForeachCallback filter, bool sorted)
RZ_API bool sdb_disk_finish(Sdb *s)
RZ_API char * sdb_array_pop_tail(Sdb *s, const char *key, ut32 *cas)
RZ_API int sdb_array_remove(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API int sdb_open(Sdb *s, const char *file)
RZ_API bool sdb_remove(Sdb *, const char *key, ut32 cas)
RZ_API bool sdb_journal_log(Sdb *s, const char *key, const char *val)
RZ_API int sdb_unset_like(Sdb *s, const char *k)
RZ_API char * sdb_get_len(Sdb *, const char *key, int *vlen, ut32 *cas)
RZ_API bool sdb_exists(Sdb *, const char *key)
int sdb_array_list(Sdb *s, const char *key)
RZ_API int sdb_array_remove_num(Sdb *s, const char *key, ut64 val, ut32 cas)
RZ_API int sdb_array_delete(Sdb *s, const char *key, int n, ut32 cas)
RZ_API ut32 sdb_hash(const char *key)
RZ_API SdbList * sdb_foreach_list(Sdb *s, bool sorted)
RZ_API bool sdb_array_contains(Sdb *s, const char *key, const char *val, ut32 *cas)
RZ_API bool sdb_sync(Sdb *)
RZ_API char * sdb_encode(const ut8 *bin, int len)
RZ_API void sdbkv_free(SdbKv *kv)
RZ_API void sdb_hook_free(Sdb *s)
RZ_API bool sdb_journal_unlink(Sdb *s)
RZ_API const char * sdb_lock_file(const char *f)
RZ_API void sdb_array_sort_num(Sdb *s, const char *key, ut32 cas)
RZ_API int sdb_concat(Sdb *s, const char *key, const char *value, ut32 cas)
RZ_API bool sdb_text_save_fd(Sdb *s, int fd, bool sort)
RZ_API ut32 sdb_hash_len(const char *key, ut32 *len)
RZ_API int sdb_array_push_num(Sdb *s, const char *key, ut64 num, ut32 cas)
RZ_API void sdb_fmt_free(void *p, const char *fmt)
RZ_API bool sdb_journal_close(Sdb *s)
RZ_API void sdb_dump_begin(Sdb *s)
RZ_API ut64 sdb_num_inc(Sdb *s, const char *key, ut64 n, ut32 cas)
RZ_API int sdb_array_set_num(Sdb *s, const char *key, int idx, ut64 val, ut32 cas)
RZ_API ut64 sdb_atoi(const char *s)
RZ_API bool sdb_hook(Sdb *s, SdbHook cb, void *user)
RZ_API int sdb_query_file(Sdb *s, const char *file)
RZ_API const char * sdb_itoca(ut64 n)
RZ_API ut64 * sdb_fmt_array_num(const char *list)
RZ_API bool sdb_expire_set(Sdb *s, const char *key, ut64 expire, ut32 cas)
RZ_API char RZ_API int sdb_fmt_init(void *p, const char *fmt)
RZ_API ut64 sdb_array_get_num(Sdb *s, const char *key, int idx, ut32 *cas)
RZ_API void sdb_ns_sync(Sdb *s)
RZ_API void sdb_global_hook(SdbHook hook, void *user)
RZ_API const char * sdb_const_get_len(Sdb *s, const char *key, int *vlen, ut32 *cas)
RZ_API bool sdb_ns_unset(Sdb *s, const char *name, Sdb *r)
RZ_API bool sdb_disk_create(Sdb *s)
RZ_API char * sdb_array_pop_head(Sdb *s, const char *key, ut32 *cas)
RZ_API int sdb_diff_format(char *str, int size, const SdbDiff *diff)
RZ_API bool sdb_array_contains_num(Sdb *s, const char *key, ut64 val, ut32 *cas)
RZ_API int sdb_query_lines(Sdb *s, const char *cmd)
RZ_API SdbList * sdb_foreach_match(Sdb *s, const char *expr, bool sorted)
RZ_API int sdb_num_base(const char *s)
RZ_API void sdb_config(Sdb *s, int options)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
static void lock(volatile int *lk)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]