CHDK_DE Vorschauversion
Trunk Rev. 6014
|
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <capstone.h>
#include "stubs_load.h"
#include "firmware_load_ng.h"
gehe zum Quellcode dieser Datei
Datenstrukturen | |
struct | lnode |
struct | llist |
Makrodefinitionen | |
#define | ADDR_HASH_BITS 20 |
#define | ADDR_HASH_BUCKETS (1<<ADDR_HASH_BITS) |
#define | ADDR_HASH_MASK (ADDR_HASH_BUCKETS-1) |
#define | ADDR_HASH(addr) (((unsigned)(addr) >> 2) & ADDR_HASH_MASK) |
#define | COMMENT_LEN 255 |
#define | DIS_OPT_LABELS 0x00000001 |
#define | DIS_OPT_SUBS 0x00000002 |
#define | DIS_OPT_CONSTS 0x00000004 |
#define | DIS_OPT_FMT_CHDK 0x00000008 |
#define | DIS_OPT_FMT_OBJDUMP 0x00000010 |
#define | DIS_OPT_ADR_LDR 0x00000020 |
#define | DIS_OPT_STR 0x00000040 |
#define | DIS_OPT_STUBS 0x00000080 |
#define | DIS_OPT_STUBS_LABEL 0x00000100 |
#define | DIS_OPT_PROPS 0x00000200 |
#define | DIS_OPT_JMP_BACK 0x00000400 |
#define | DIS_OPT_END_RET 0x00000800 |
#define | DIS_OPT_SIMPLE_FUNCS 0x00001000 |
#define | DIS_OPT_DETAIL_GROUP 0x00010000 |
#define | DIS_OPT_DETAIL_OP 0x00020000 |
#define | DIS_OPT_DETAIL_ADDR 0x00040000 |
#define | DIS_OPT_DETAIL_BIN 0x00080000 |
#define | DIS_OPT_DETAIL_CONST 0x00100000 |
#define | DIS_OPT_DETAIL_ALL |
Typdefinitionen | |
typedef unsigned int | t_address |
typedef unsigned int | t_value |
Funktionen | |
struct llist * | new_list () |
void | free_list (struct llist *lst) |
struct lnode * | new_node (t_address address, t_value data) |
struct lnode * | l_search (struct llist *ls, t_address address) |
int | l_insert (struct llist *ls, t_address address, t_value data) |
void | l_remove (struct llist *ls, t_address addr) |
struct llist ** | addr_hash_new () |
void | addr_hash_free (struct llist **addr_hash) |
struct lnode * | addr_hash_get (struct llist **addr_hash, t_address addr) |
void | addr_hash_add (struct llist **addr_hash, t_address addr) |
void | usage (void) |
static const char * | arm_op_type_name (int op_type) |
static void | describe_insn_ops (csh handle, cs_insn *insn) |
static void | describe_insn_groups (csh handle, cs_insn *insn) |
static void | describe_str (firmware *fw, char *comment, uint32_t adr) |
void | describe_const_op (firmware *fw, unsigned dis_opts, char *comment, uint32_t adr) |
void | describe_prop_call (firmware *fw, iter_state_t *is, unsigned dis_opts, char *comment, uint32_t target) |
void | describe_simple_func (firmware *fw, unsigned dis_opts, char *comment, uint32_t target) |
int | do_dis_branch (firmware *fw, iter_state_t *is, unsigned dis_opts, char *ops, char *comment) |
int | do_dis_call (firmware *fw, iter_state_t *is, unsigned dis_opts, char *ops, char *comment) |
static void | do_dis_insn (firmware *fw, iter_state_t *is, unsigned dis_opts, char *mnem, char *ops, char *comment, tbx_info_t *ti) |
void | do_adr_label (firmware *fw, struct llist **branch_list, iter_state_t *is, unsigned dis_opts) |
static void | do_tbb_data (firmware *fw, iter_state_t *is, unsigned dis_opts, tbx_info_t *ti) |
static void | do_tbh_data (firmware *fw, iter_state_t *is, unsigned dis_opts, tbx_info_t *ti) |
static void | do_tbx_pass1 (firmware *fw, iter_state_t *is, struct llist **branch_list, unsigned dis_opts, tbx_info_t *ti) |
static void | do_tbx_data (firmware *fw, iter_state_t *is, unsigned dis_opts, tbx_info_t *ti) |
static void | do_dis_range (firmware *fw, unsigned dis_start, unsigned dis_count, unsigned dis_end, unsigned dis_end_ret_count, unsigned dis_opts) |
int | main (int argc, char **argv) |
Variablen | |
static t_address | set_prop |
static t_address | get_prop |
const char * | comment_start = ";" |
#define ADDR_HASH | ( | addr) | (((unsigned)(addr) >> 2) & ADDR_HASH_MASK) |
#define ADDR_HASH_BUCKETS (1<<ADDR_HASH_BITS) |
#define ADDR_HASH_MASK (ADDR_HASH_BUCKETS-1) |
#define DIS_OPT_DETAIL_ALL |
|
static |
|
static |
|
static |
void describe_prop_call | ( | firmware * | fw, |
iter_state_t * | is, | ||
unsigned | dis_opts, | ||
char * | comment, | ||
uint32_t | target | ||
) |
void do_adr_label | ( | firmware * | fw, |
struct llist ** | branch_list, | ||
iter_state_t * | is, | ||
unsigned | dis_opts | ||
) |
int do_dis_branch | ( | firmware * | fw, |
iter_state_t * | is, | ||
unsigned | dis_opts, | ||
char * | ops, | ||
char * | comment | ||
) |
int do_dis_call | ( | firmware * | fw, |
iter_state_t * | is, | ||
unsigned | dis_opts, | ||
char * | ops, | ||
char * | comment | ||
) |
Definiert in Zeile 515 der Datei capdis.c.
|
static |
|
static |
|
static |
Definiert in Zeile 692 der Datei capdis.c.
|
static |
Definiert in Zeile 754 der Datei capdis.c.
|
static |
|
static |
void free_list | ( | struct llist * | lst) |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definiert in Zeile 1000 der Datei capdis.c.
struct llist* new_list | ( | ) |