Skip to content

Commit 0716ef9

Browse files
committed
Improve the information filter of dp.memory.query
1 parent 36299c1 commit 0716ef9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dumpulator/memory.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,15 @@ def add_info(region: MemoryRegion):
358358
break
359359
else:
360360
assert False # unreachable
361+
# Only keep information starting from the current page, or the parent page if none
361362
if result is not None:
362363
result.info = []
363364
for info, start_addr in result_info.items():
364365
if start_addr >= result.base:
365366
result.info.append(info)
367+
if len(result.info) == 0 and len(result_info) > 0:
368+
result.info = list(result_info.keys())[:1]
369+
366370
return result
367371

368372
def map(self) -> List[MemoryBasicInformation]:

0 commit comments

Comments
 (0)