6 #include "../bin/pdb/pdb.h"
11 eprintf(
"there is nothing to print!\n");
34 pj_ks(pj,
"type",
"structure");
42 pj_ks(pj,
"member_type", typ);
54 pj_ks(pj,
"type",
"union");
62 pj_ks(pj,
"member_type", typ);
74 pj_ks(pj,
"type",
"enum");
77 pj_ks(pj,
"base_type", typ);
104 eprintf(
"There is no tpi stream in current pdb\n");
107 switch (
state->mode) {
145 gsym_data_stream = pdb->s_gdata;
146 pe_stream = pdb->s_pe;
147 omap_stream = pdb->s_omap;
152 rz_list_foreach (gsym_data_stream->
global_list, it, gdata) {
162 pj_ks(pj,
"section_name", sctn_header->
name);
209 gsym_data_stream = pdb->
s_gdata;
210 pe_stream = pdb->
s_pe;
211 omap_stream = pdb->
s_omap;
217 rz_list_foreach (gsym_data_stream->
global_list, it, gdata) {
233 rz_flag_space_pop(core->
flags);
251 eprintf(
"Warning: Cannot find base address, flags will probably be misplaced\n");
277 if (core->bin->cur && core->bin->cur->o && core->bin->cur->o->opts.baseaddr) {
278 baddr = core->bin->cur->o->opts.baseaddr;
280 eprintf(
"Warning: Cannot find base address, flags will probably be misplaced\n");
RZ_API RZ_OWN char * rz_type_db_base_type_as_pretty_string(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, unsigned int opts, int unfold_level)
Returns C representation as string of RzBaseType.
RZ_API ut64 rz_bin_get_baddr(RzBin *bin)
static ut64 baddr(RzBinFile *bf)
RZ_API void rz_cmd_state_output_array_start(RzCmdStateOutput *state)
Mark the start of an array of elements in the output.
RZ_API void rz_cmd_state_output_array_end(RzCmdStateOutput *state)
Mark the end of an array of elements in the output.
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
static void rz_core_bin_pdb_gvars_print(const RzPdb *pdb, const ut64 img_base, const RzCmdStateOutput *state)
static void pdb_set_symbols(const RzCore *core, const RzPdb *pdb, const ut64 img_base, const char *pdbfile)
RZ_API void rz_core_pdb_info_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzTypeDB *db, RZ_NONNULL RzPdb *pdb, RZ_NONNULL RzCmdStateOutput *state)
Print parsed PDB file info.
RZ_API char * rz_core_bin_pdb_gvars_as_string(RZ_NONNULL const RzPdb *pdb, const ut64 img_base, PJ *pj, const RzOutputMode mode)
Return the PDB global vars string.
static void rz_core_bin_pdb_types_print(const RzTypeDB *db, const RzPdb *pdb, const RzCmdStateOutput *state)
static void pdb_types_print_json(const RzTypeDB *db, const RzPdb *pdb, const RzList *types, PJ *pj)
RZ_API RzPdb * rz_core_pdb_load_info(RZ_NONNULL RzCore *core, RZ_NONNULL const char *file)
Parse PDB file info and integrate with typedb.
static void pdb_types_print_standard(const RzTypeDB *db, const RzPdb *pdb, const RzList *types)
RZ_API RzFlagItem * rz_flag_set(RzFlag *f, const char *name, ut64 off, ut32 size)
RZ_API void rz_flag_item_set_realname(RzFlagItem *item, const char *realname)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_OWN char * rz_demangler_msvc(RZ_NONNULL const char *symbol)
Demangles microsft vc symbols.
RZ_API RZ_BORROW void * rz_list_get_n(RZ_NONNULL const RzList *list, ut32 n)
Returns the N-th element of the list.
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")
RZ_API int rz_bin_pdb_omap_remap(RZ_NONNULL RzPdbOmapStream *omap_stream, int address)
return remapped symbol address
insn_type_descr_t types[]
RZ_API RZ_OWN RzPdb * rz_bin_pdb_parse_from_file(RZ_NONNULL const char *filename)
Parse PDB file given the path.
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
#define RZ_FLAGS_FS_SYMBOLS
RZ_API const char * rz_file_basename(const char *path)
RZ_API char * rz_name_filter2(const char *name, bool strict)
RZ_API PJ * pj_ka(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
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)
RZ_API PJ * pj_kN(PJ *j, const char *k, st64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_replace(char *str, const char *key, const char *val, int g)
RZ_API char * rz_strbuf_get(RzStrBuf *sb)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API void rz_strbuf_free(RzStrBuf *sb)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
@ RZ_BASE_TYPE_KIND_UNION
@ RZ_BASE_TYPE_KIND_STRUCT
@ RZ_TYPE_PRINT_END_NEWLINE
@ RZ_TYPE_PRINT_MULTILINE
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_STANDARD
#define rz_vector_foreach(vec, it)
#define PDB_SIZEOF_SECTION_NAME
Represent the output state of a command handler.
RzPdbGDataStream * s_gdata
RZ_API RZ_OWN char * rz_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the type C representation.
RZ_API void rz_parse_pdb_types(const RzTypeDB *typedb, const RzPdb *pdb)
Saves PDB types from TPI stream into the type database.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()