Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_bin.h>
#include <rz_type.h>
#include <string.h>
#include <rz_demangler.h>
#include <mspack.h>
#include "pdb.h"
Go to the source code of this file.
Functions | |
static bool | parse_pdb_stream (RzPdb *pdb, RzPdbMsfStream *stream) |
static bool | parse_streams (RzPdb *pdb) |
static void | msf_stream_free (void *data) |
static void | msf_stream_directory_free (void *data) |
static ut64 | count_blocks (ut64 length, ut64 block_size) |
static RzList * | pdb7_extract_streams (RzPdb *pdb, RzPdbMsfStreamDirectory *msd) |
static RzPdbMsfStreamDirectory * | pdb7_extract_msf_stream_directory (RzPdb *pdb) |
static bool | pdb7_parse (RzPdb *pdb) |
bool | is_compressed_pdb (RzBuffer *buf) |
RZ_API RZ_OWN RzPdb * | rz_bin_pdb_parse_from_file (RZ_NONNULL const char *filename) |
Parse PDB file given the path. More... | |
RZ_API RZ_OWN RzPdb * | rz_bin_pdb_parse_from_buf (RZ_NONNULL const RzBuffer *buf) |
Parse PDB from the buffer. More... | |
RZ_API void | rz_bin_pdb_free (RzPdb *pdb) |
Free PDB instance. More... | |
Definition at line 105 of file pdb.c.
References length, and ut64().
Referenced by pdb7_extract_msf_stream_directory(), and pdb7_extract_streams().
Definition at line 275 of file pdb.c.
References CAB_SIGNATURE, and rz_buf_read_at().
Referenced by rz_bin_pdb_parse_from_file().
|
static |
Definition at line 98 of file pdb.c.
References rz_buf_free(), RZ_FREE, RzPdbMsfStreamDirectory::sd, and RzPdbMsfStreamDirectory::StreamSizes.
Referenced by pdb7_extract_streams(), and pdb7_parse().
|
static |
Definition at line 92 of file pdb.c.
References rz_buf_free(), RZ_FREE, and RzPdbMsfStream::stream_data.
Referenced by pdb7_extract_streams().
|
static |
Definition at line 13 of file pdb.c.
References rz_buf_read(), rz_buf_read_le16, rz_buf_read_le32, RZ_LOG_ERROR, RZ_NEW0, s, rz_pdb_t::s_pdb, and VC70.
Referenced by parse_streams().
Definition at line 38 of file pdb.c.
References dbi_stream_t::dbg_hdr, dbi_stream_t::hdr, parse_dbi_stream(), parse_gdata_stream(), parse_omap_stream(), parse_pdb_stream(), parse_pe_stream(), parse_tpi_stream(), PDB_STREAM_DBI, PDB_STREAM_PDB, PDB_STREAM_ROOT, PDB_STREAM_TPI, RZ_LOG_ERROR, rz_pdb_t::s_dbi, RzPdbRzPdbDbiStreamDbgHeader::sn_omap_from_src, RzPdbRzPdbDbiStreamDbgHeader::sn_omap_to_src, RzPdbRzPdbDbiStreamDbgHeader::sn_section_hdr, RzPdbRzPdbDbiStreamDbgHeader::sn_section_hdr_orig, RzPdbMsfStream::stream_idx, rz_pdb_t::streams, and dbi_stream_header_t::sym_record_stream.
Referenced by pdb7_parse().
|
static |
Definition at line 170 of file pdb.c.
References RzPdbMsfSuperBlock::block_map_addr, RzPdbMsfSuperBlock::block_size, blocks, rz_pdb_t::buf, count_blocks(), error(), i, malloc(), NULL, RzPdbMsfSuperBlock::num_blocks, RzPdbMsfSuperBlock::num_directory_bytes, RzPdbMsfStreamDirectory::NumStreams, rz_buf_new_with_pointers(), rz_buf_read(), rz_buf_read_le32, rz_buf_seek(), RZ_BUF_SET, RZ_FREE, RZ_LOG_ERROR, RZ_NEW0, RzPdbMsfStreamDirectory::sd, RzPdbMsfStreamDirectory::StreamSizes, rz_pdb_t::super_block, and UT32_MAX.
Referenced by pdb7_parse().
|
static |
Definition at line 116 of file pdb.c.
References RzPdbMsfSuperBlock::block_size, rz_pdb_t::buf, count_blocks(), i, malloc(), msf_stream_directory_free(), msf_stream_free(), NULL, RzPdbMsfStreamDirectory::NumStreams, rz_buf_new_with_pointers(), rz_buf_read(), rz_buf_read_le32, rz_buf_seek(), RZ_BUF_SET, RZ_FREE, rz_list_append(), rz_list_free(), rz_list_newf(), RZ_LOG_ERROR, RZ_NEW0, RzPdbMsfStreamDirectory::sd, streams, RzPdbMsfStreamDirectory::StreamSizes, and rz_pdb_t::super_block.
Referenced by pdb7_parse().
Definition at line 258 of file pdb.c.
References error(), msf_stream_directory_free(), parse_streams(), pdb7_extract_msf_stream_directory(), pdb7_extract_streams(), RZ_LOG_ERROR, and rz_pdb_t::streams.
Referenced by rz_bin_pdb_parse_from_buf().
Free PDB instance.
pdb | PDB instance |
Definition at line 366 of file pdb.c.
References rz_pdb_t::buf, free(), free_dbi_stream(), free_gdata_stream(), free_omap_stream(), free_pe_stream(), free_tpi_stream(), rz_buf_free(), rz_list_free(), rz_pdb_t::s_dbi, rz_pdb_t::s_gdata, rz_pdb_t::s_omap, rz_pdb_t::s_pdb, rz_pdb_t::s_pe, rz_pdb_t::s_tpi, rz_pdb_t::streams, and rz_pdb_t::super_block.
Referenced by GetHeapGlobalsOffset(), rz_bin_pdb_parse_from_buf(), rz_cmd_info_pdb_show_handler(), rz_core_bin_pdb_load(), and rz_core_bin_print().
Parse PDB from the buffer.
buf | mmap of the PDB file |
Definition at line 315 of file pdb.c.
References RzPdbMsfSuperBlock::block_map_addr, RzPdbMsfSuperBlock::block_size, rz_pdb_t::buf, error(), RzPdbMsfSuperBlock::file_magic, RzPdbMsfSuperBlock::free_block_map_block, if(), len, NULL, RzPdbMsfSuperBlock::num_blocks, RzPdbMsfSuperBlock::num_directory_bytes, pdb7_parse(), PDB_SIGNATURE, PDB_SIGNATURE_LEN, rz_bin_pdb_free(), rz_buf_read(), rz_buf_read_le32, rz_buf_size(), RZ_LOG_ERROR, RZ_NEW0, rz_return_val_if_fail, st64, rz_pdb_t::super_block, RzPdbMsfSuperBlock::unknown, ut64(), and valid.
Referenced by rz_bin_pdb_parse_from_file().
RZ_API RZ_OWN RzPdb* rz_bin_pdb_parse_from_file | ( | RZ_NONNULL const char * | filename | ) |
Parse PDB file given the path.
filename | path of the PDB file |
Definition at line 292 of file pdb.c.
References is_compressed_pdb(), NULL, rz_bin_pdb_parse_from_buf(), rz_buf_free(), rz_buf_new_slurp(), RZ_LOG_ERROR, and rz_return_val_if_fail.
Referenced by GetHeapGlobalsOffset(), and rz_core_pdb_load_info().