fix: use correct amount of bytes in guard of DIE read loop
This commit is contained in:
parent
5ec36f31e5
commit
49d52061f7
1 changed files with 2 additions and 1 deletions
3
main.cpp
3
main.cpp
|
|
@ -165,7 +165,8 @@ void parse_debuginfo_section(const void *file)
|
|||
uint64_t code;
|
||||
fprintf(stdout, ".debug_info offset for first DIE: %#x\n", ((uint64_t)p - (uint64_t)file));
|
||||
// TODO: 32bit size
|
||||
for (; ((uint64_t)p - (uint64_t)cuh) < cuh->unit_length - 12;)
|
||||
// TODO: unit_length is supposed to be 4/12 Bytes
|
||||
for (; ((uint64_t)p - (uint64_t)cuh) < cuh->unit_length + sizeof(compilation_unit_header_t) - 12;)
|
||||
{
|
||||
p += decode_leb128((uint8_t*)p, &code);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue