Rizin
unix-like reverse engineering framework and cli tools
|
#include <string.h>
#include <rz_util.h>
#include <rz_core.h>
#include <rz_windows.h>
#include <rz_socket.h>
#include "pdb_downloader.h"
Go to the source code of this file.
Functions | |
static bool | download_and_write (SPDBDownloaderOpt *opt, const char *file) |
static char * | download (struct SPDBDownloader *pd) |
void | init_pdb_downloader (SPDBDownloaderOpt *opt, SPDBDownloader *pd) |
initialization of pdb downloader by SPDBDownloaderOpt More... | |
void | deinit_pdb_downloader (SPDBDownloader *pd) |
deinitialization of PDB downloader More... | |
static bool | is_valid_guid (const char *guid) |
RZ_API int | rz_bin_pdb_download (RZ_NONNULL RzBin *bin, RZ_NULLABLE PJ *pj, int isradjson, RZ_NONNULL SPDBOptions *options) |
Download PDB file for currently opened RzBin file. More... | |
RZ_API RZ_OWN char * | rz_bin_symserver_download (RZ_NONNULL const SPDBDownloaderOpt *options) |
downloads file from symbol server More... | |
void deinit_pdb_downloader | ( | SPDBDownloader * | pd | ) |
deinitialization of PDB downloader
pdb_downloader | PDB downloader that will be deinitialized |
Definition at line 142 of file pdb_downloader.c.
References SPDBDownloaderOpt::dbg_file, SPDBDownloader::download, SPDBDownloaderOpt::guid, SPDBDownloader::opt, RZ_FREE, SPDBDownloaderOpt::symbol_server, and SPDBDownloaderOpt::symbol_store_path.
Referenced by rz_bin_symserver_download().
|
static |
Definition at line 59 of file pdb_downloader.c.
References SPDBDownloaderOpt::dbg_file, download_and_write(), eprintf, SPDBDownloaderOpt::extract, free(), SPDBDownloaderOpt::guid, NULL, SPDBDownloader::opt, rz_bin_pdb_extract_in_folder(), rz_file_dirname(), rz_file_exists(), rz_file_rm(), RZ_FREE, rz_str_newf(), RZ_SYS_DIR, strdup(), and SPDBDownloaderOpt::symbol_store_path.
Referenced by init_pdb_downloader().
|
static |
Definition at line 11 of file pdb_downloader.c.
References SPDBDownloaderOpt::dbg_file, dest, f, FALSE, benchmark::FILE, free(), SPDBDownloaderOpt::guid, len, NULL, path, rz_file_exists(), rz_socket_http_get(), RZ_STR_ISEMPTY, rz_str_newf(), rz_str_startswith(), RZ_SYS_DIR, rz_sys_mkdirp(), SPDBDownloaderOpt::symbol_server, SPDBDownloaderOpt::symbol_store_path, and setup::url.
Referenced by download().
void init_pdb_downloader | ( | SPDBDownloaderOpt * | opt, |
SPDBDownloader * | pd | ||
) |
initialization of pdb downloader by SPDBDownloaderOpt
opt | PDB options |
pdb_downloader | PDB downloader that will be initialized |
Definition at line 122 of file pdb_downloader.c.
References SPDBDownloaderOpt::dbg_file, download(), SPDBDownloader::download, eprintf, SPDBDownloaderOpt::extract, SPDBDownloaderOpt::guid, SPDBDownloader::opt, RZ_NEW0, strdup(), SPDBDownloaderOpt::symbol_server, and SPDBDownloaderOpt::symbol_store_path.
Referenced by rz_bin_symserver_download().
RZ_API int rz_bin_pdb_download | ( | RZ_NONNULL RzBin * | bin, |
RZ_NULLABLE PJ * | pj, | ||
int | isradjson, | ||
RZ_NONNULL SPDBOptions * | options | ||
) |
Download PDB file for currently opened RzBin file.
bin | RzBin instance |
pj | Optional PJ instance for json output |
isradjson | Use pj for json output |
options | symbol server options for downloading the PDB file |
Definition at line 171 of file pdb_downloader.c.
References SPDBDownloaderOpt::dbg_file, rz_bin_info_t::debug_file_name, SPDBDownloaderOpt::extract, free(), SPDBDownloaderOpt::guid, rz_bin_info_t::guid, info(), is_valid_guid(), options, path, pj_end(), pj_kb(), pj_ko(), pj_ks(), rz_bin_get_info(), rz_bin_symserver_download(), rz_cons_printf(), rz_file_dos_basename(), RZ_LOG_ERROR, rz_return_val_if_fail, SPDBDownloaderOpt::symbol_server, and SPDBDownloaderOpt::symbol_store_path.
Referenced by download_pdb(), GetHeapGlobalsOffset(), rz_cmd_info_pdb_download_handler(), and rz_main_rz_bin().
RZ_API RZ_OWN char* rz_bin_symserver_download | ( | RZ_NONNULL const SPDBDownloaderOpt * | options | ) |
downloads file from symbol server
options | options for downloading file |
Definition at line 219 of file pdb_downloader.c.
References deinit_pdb_downloader(), SPDBDownloader::download, free(), init_pdb_downloader(), NULL, options, path, rz_return_val_if_fail, strdup(), and SPDBDownloaderOpt::symbol_server.
Referenced by rz_bin_pdb_download(), and winkd_download_module_and_pdb().