Be a little more careful before assuming we have crate debuginfo and abbrevs to read.
This commit is contained in:
parent
34016d323c
commit
bf3528342a
@ -47,14 +47,22 @@ rust_crate::mem_area::mem_area(rust_dom *dom, uintptr_t pos, size_t sz)
|
||||
|
||||
rust_crate::mem_area
|
||||
rust_crate::get_debug_info(rust_dom *dom) const {
|
||||
return mem_area(dom, ((uintptr_t)this + debug_info_off),
|
||||
debug_info_sz);
|
||||
if (debug_info_off)
|
||||
return mem_area(dom,
|
||||
((uintptr_t)this + debug_info_off),
|
||||
debug_info_sz);
|
||||
else
|
||||
return mem_area(dom, 0, 0);
|
||||
}
|
||||
|
||||
rust_crate::mem_area
|
||||
rust_crate::get_debug_abbrev(rust_dom *dom) const {
|
||||
return mem_area(dom, ((uintptr_t)this + debug_abbrev_off),
|
||||
debug_abbrev_sz);
|
||||
if (debug_abbrev_off)
|
||||
return mem_area(dom,
|
||||
((uintptr_t)this + debug_abbrev_off),
|
||||
debug_abbrev_sz);
|
||||
else
|
||||
return mem_area(dom, 0, 0);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -118,7 +118,7 @@ rust_crate_reader::abbrev_reader::abbrev_reader
|
||||
abbrevs(abbrev_mem.dom)
|
||||
{
|
||||
rust_dom *dom = mem.dom;
|
||||
while (is_ok()) {
|
||||
while (is_ok() && !at_end()) {
|
||||
|
||||
// dom->log(rust_log::DWARF, "reading new abbrev at 0x%" PRIxPTR,
|
||||
// tell_off());
|
||||
|
Loading…
x
Reference in New Issue
Block a user