dbghelp: Pass .debug_loc section information to dwarf.
This commit is contained in:
parent
d6bd8661ff
commit
a655b14340
|
@ -434,7 +434,8 @@ extern BOOL stabs_parse(struct module* module, unsigned long load_offset
|
|||
extern BOOL dwarf2_parse(struct module* module, unsigned long load_offset,
|
||||
const unsigned char* debug, unsigned int debug_size,
|
||||
const unsigned char* abbrev, unsigned int abbrev_size,
|
||||
const unsigned char* str, unsigned int str_sz);
|
||||
const unsigned char* str, unsigned int str_size,
|
||||
const unsigned char* line, unsigned int line_size);
|
||||
|
||||
/* symbol.c */
|
||||
extern const char* symt_get_name(const struct symt* sym);
|
||||
|
|
|
@ -154,7 +154,7 @@ typedef struct dwarf2_section_s
|
|||
unsigned size;
|
||||
} dwarf2_section_t;
|
||||
|
||||
enum dwarf2_sections {section_debug, section_string, section_abbrev, section_max};
|
||||
enum dwarf2_sections {section_debug, section_string, section_abbrev, section_line, section_max};
|
||||
|
||||
typedef struct dwarf2_traverse_context_s
|
||||
{
|
||||
|
@ -1456,7 +1456,8 @@ static BOOL dwarf2_parse_compilation_unit(const dwarf2_section_t* sections,
|
|||
BOOL dwarf2_parse(struct module* module, unsigned long load_offset,
|
||||
const unsigned char* debug, unsigned int debug_size,
|
||||
const unsigned char* abbrev, unsigned int abbrev_size,
|
||||
const unsigned char* str, unsigned int str_size)
|
||||
const unsigned char* str, unsigned int str_size,
|
||||
const unsigned char* line, unsigned int line_size)
|
||||
{
|
||||
dwarf2_section_t section[section_max];
|
||||
const unsigned char*comp_unit_cursor = debug;
|
||||
|
@ -1468,6 +1469,8 @@ BOOL dwarf2_parse(struct module* module, unsigned long load_offset,
|
|||
section[section_abbrev].size = abbrev_size;
|
||||
section[section_string].address = str;
|
||||
section[section_string].size = str_size;
|
||||
section[section_line].address = line;
|
||||
section[section_line].size = line_size;
|
||||
|
||||
while (comp_unit_cursor < end_debug)
|
||||
{
|
||||
|
|
|
@ -867,23 +867,27 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
|
|||
const BYTE* dw2_debug;
|
||||
const BYTE* dw2_debug_abbrev;
|
||||
const BYTE* dw2_debug_str;
|
||||
const BYTE* dw2_debug_line;
|
||||
|
||||
FIXME("Alpha-support for Dwarf2 information for %s\n", module->module.ModuleName);
|
||||
|
||||
dw2_debug = (const BYTE*) elf_map_section(fmap, debug_sect);
|
||||
dw2_debug_abbrev = (const BYTE*) elf_map_section(fmap, debug_abbrev_sect);
|
||||
dw2_debug_str = (const BYTE*) elf_map_section(fmap, debug_str_sect);
|
||||
dw2_debug_line = (const BYTE*) elf_map_section(fmap, debug_line_sect);
|
||||
if (dw2_debug != NO_MAP && NO_MAP != dw2_debug_abbrev && dw2_debug_str != NO_MAP)
|
||||
{
|
||||
/* OK, now just parse dwarf2 debug infos. */
|
||||
ret = dwarf2_parse(module, module->elf_info->elf_addr,
|
||||
dw2_debug, fmap->sect[debug_sect].shdr.sh_size,
|
||||
dw2_debug_abbrev, fmap->sect[debug_abbrev_sect].shdr.sh_size,
|
||||
dw2_debug_str, fmap->sect[debug_str_sect].shdr.sh_size);
|
||||
dw2_debug_str, fmap->sect[debug_str_sect].shdr.sh_size,
|
||||
dw2_debug_line, fmap->sect[debug_line_sect].shdr.sh_size);
|
||||
}
|
||||
elf_unmap_section(fmap, debug_sect);
|
||||
elf_unmap_section(fmap, debug_abbrev_sect);
|
||||
elf_unmap_section(fmap, debug_str_sect);
|
||||
elf_unmap_section(fmap, debug_line_sect);
|
||||
if (!ret)
|
||||
{
|
||||
WARN("Couldn't correctly read stabs\n");
|
||||
|
|
Loading…
Reference in New Issue