dwarf_loader: Properly initialize ->size in lexblock__init
When dwarf_lowpc failed we were not initializing ->size, so garbage was being left there and thing like 'pfunct --sizes' were producing senseless results. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
5859ddcbf1
commit
0412efb401
|
@ -755,9 +755,10 @@ static void lexblock__init(struct lexblock *self, struct cu *cu,
|
|||
{
|
||||
Dwarf_Off high_pc;
|
||||
|
||||
if (!cu->has_addr_info || dwarf_lowpc(die, &self->ip.addr))
|
||||
if (!cu->has_addr_info || dwarf_lowpc(die, &self->ip.addr)) {
|
||||
self->ip.addr = 0;
|
||||
else if (dwarf_highpc(die, &high_pc))
|
||||
self->size = 0;
|
||||
} else if (dwarf_highpc(die, &high_pc))
|
||||
self->size = 0;
|
||||
else
|
||||
self->size = high_pc - self->ip.addr;
|
||||
|
|
Loading…
Reference in New Issue