mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-24 14:54:54 +00:00
parent
497148b0cd
commit
2b8c94c2cf
@ -2772,7 +2772,7 @@ static void get_nb10(ut8* dbg_data, int dbg_data_len, SCV_NB10_HEADER* res) {
|
||||
static int get_debug_info(struct PE_(r_bin_pe_obj_t)* bin, PE_(image_debug_directory_entry)* dbg_dir_entry, ut8* dbg_data, int dbg_data_len, SDebugInfo* res) {
|
||||
#define SIZEOF_FILE_NAME 255
|
||||
int i = 0;
|
||||
const char* basename;
|
||||
const char* dbgname;
|
||||
if (!dbg_data) {
|
||||
return 0;
|
||||
}
|
||||
@ -2799,9 +2799,9 @@ static int get_debug_info(struct PE_(r_bin_pe_obj_t)* bin, PE_(image_debug_direc
|
||||
rsds_hdr.guid.data4[6],
|
||||
rsds_hdr.guid.data4[7],
|
||||
rsds_hdr.age);
|
||||
basename = r_file_basename ((char*) rsds_hdr.file_name);
|
||||
dbgname = (char*) rsds_hdr.file_name;
|
||||
strncpy (res->file_name, (const char*)
|
||||
basename, sizeof (res->file_name));
|
||||
dbgname, sizeof (res->file_name));
|
||||
res->file_name[sizeof (res->file_name) - 1] = 0;
|
||||
rsds_hdr.free ((struct SCV_RSDS_HEADER*) &rsds_hdr);
|
||||
} else if (strncmp ((const char*) dbg_data, "NB10", 4) == 0) {
|
||||
|
@ -195,7 +195,7 @@ int r_bin_pdb_download(RCore *core, int isradjson, int *actions_done, SPDBOption
|
||||
return 1;
|
||||
}
|
||||
|
||||
opt.dbg_file = info->debug_file_name;
|
||||
opt.dbg_file = (char*) r_file_basename (info->debug_file_name);
|
||||
opt.guid = info->guid;
|
||||
opt.symbol_server = options->symbol_server;
|
||||
opt.user_agent = options->user_agent;
|
||||
|
@ -599,9 +599,9 @@ static int cmd_info(void *data, const char *input) {
|
||||
break;
|
||||
}
|
||||
// Check raw path for debug filename
|
||||
file_found = r_file_exists (info->debug_file_name);
|
||||
file_found = r_file_exists (r_file_basename (info->debug_file_name));
|
||||
if (file_found) {
|
||||
filename = strdup (info->debug_file_name);
|
||||
filename = strdup (r_file_basename (info->debug_file_name));
|
||||
} else {
|
||||
// Check debug filename basename in current directory
|
||||
char* basename = (char*) r_file_basename (info->debug_file_name);
|
||||
@ -620,8 +620,8 @@ static int cmd_info(void *data, const char *input) {
|
||||
if (!file_found) {
|
||||
const char* symstore_path = r_config_get (core->config, "pdb.symstore");
|
||||
char* pdb_path = r_str_newf ("%s" R_SYS_DIR "%s" R_SYS_DIR "%s" R_SYS_DIR "%s",
|
||||
symstore_path, info->debug_file_name,
|
||||
info->guid, info->debug_file_name);
|
||||
symstore_path, r_file_basename (info->debug_file_name),
|
||||
info->guid, r_file_basename (info->debug_file_name));
|
||||
file_found = r_file_exists (pdb_path);
|
||||
if (file_found) {
|
||||
filename = pdb_path;
|
||||
@ -632,7 +632,7 @@ static int cmd_info(void *data, const char *input) {
|
||||
}
|
||||
|
||||
if (!file_found) {
|
||||
eprintf ("File '%s' not found in file directory or symbol store", info->debug_file_name);
|
||||
eprintf ("File '%s' not found in file directory or symbol store", r_file_basename (info->debug_file_name));
|
||||
free (filename);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user