8000 Merge pull request #749 from tannewt/analyze_heap_dump · rbarraud/circuitpython@3883a9f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3883a9f

Browse files
authored
Merge pull request adafruit#749 from tannewt/analyze_heap_dump
Fix rom qstr pool length.
2 parents d203d1c + 619b0ec commit 3883a9f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/analyze_heap_dump.py

Lines changed: 1 addition & 3 deletions
56
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
56
help="Draw the heap layout")
5757
@click.option("--draw-heap-ownership/--no-draw-heap-ownership", default=False,
5858
help="Draw the ownership graph of blocks on the heap")
59-
@click.option("--draw-heap-ownership/--no-draw-heap-ownership", default=False,
60-
help="Draw the ownership graph of blocks on the heap")
6159
@click.option("--analyze-snapshots", default="last", type=click.Choice(['all', 'last']))
6260
def do_all_the_things(ram_filename, bin_filename, map_filename, print_block_contents,
6361
print_unknown_types, print_block_state, print_conflicting_symbols,
@@ -352,7 +350,7 @@ def find_qstr(qstr_index):
352350
else:
353351
rom_offset = pool_ptr - rom_start
354352
prev, total_prev_len, alloc, length = struct.unpack_from("<IIII", rom[rom_offset:rom_offset+32])
355-
pool = rom[rom_offset:rom_offset+length*4]
353+
pool = rom[rom_offset:rom_offset + 32 + length * 4]
356354

357355
if qstr_index >= total_prev_len:
358356
offset = (qstr_index - total_prev_len) * 4 + 16
0