X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdll%2Fwin32%2Fdbghelp%2Fpe_module.c;h=dac94bb907185c17a01923577cb941704159f06e;hp=a8469b5383a519138088e9fe361d12762785173c;hb=b742e89b018819a1359188b9c21c216c96108975;hpb=e2c97e602fdebde4fb44b63dc8399fa7d740da73;ds=inline diff --git a/reactos/dll/win32/dbghelp/pe_module.c b/reactos/dll/win32/dbghelp/pe_module.c index a8469b5383a..dac94bb9071 100644 --- a/reactos/dll/win32/dbghelp/pe_module.c +++ b/reactos/dll/win32/dbghelp/pe_module.c @@ -506,6 +506,32 @@ static BOOL pe_load_dwarf(struct module* module) } #ifndef DBGHELP_STATIC_LIB +/****************************************************************** + * pe_load_rsym + * + * look for ReactOS's own rsym format + */ +static BOOL pe_load_rsym(struct module* module) +{ + struct image_file_map* fmap = &module->format_info[DFI_PE]->u.pe_info->fmap; + struct image_section_map sect_rsym; + BOOL ret = FALSE; + + if (pe_find_section(fmap, ".rossym", §_rsym)) + { + const char* rsym = image_map_section(§_rsym); + if (rsym != IMAGE_NO_MAP) + { + ret = rsym_parse(module, module->module.BaseOfImage, + rsym, image_get_map_size(§_rsym)); + } + image_unmap_section(§_rsym); + } + TRACE("%s the RSYM debug info\n", ret ? "successfully loaded" : "failed to load"); + + return ret; +} + /****************************************************************** * pe_load_dbg_file * @@ -704,7 +730,9 @@ BOOL pe_load_debug_info(const struct process* pcs, struct module* module) ret = pe_load_dwarf(module) || ret; #ifndef DBGHELP_STATIC_LIB ret = pe_load_msc_debug_info(pcs, module) || ret; + ret = pe_load_rsym(module) || ret; #endif + ret = ret || pe_load_coff_symbol_table(module); /* FIXME */ /* if we still have no debug info (we could only get SymExport at this * point), then do the SymExport except if we have an ELF container,