elf_mem_map: allow to disable gap dumps

This commit is contained in:
Yuri D'Elia 2021-06-02 21:58:49 +02:00 committed by DRracer
parent bb8d171f34
commit 9ddb5991f2
1 changed files with 3 additions and 1 deletions

View File

@ -202,6 +202,8 @@ def main():
show the value of each symbol which is within the address range. show the value of each symbol which is within the address range.
""") """)
ap.add_argument('elf', help='ELF file containing DWARF2 debugging information') ap.add_argument('elf', help='ELF file containing DWARF2 debugging information')
ap.add_argument('--no-gaps', action='store_true',
help='do not dump memory inbetween known symbols')
g = ap.add_mutually_exclusive_group(required=True) g = ap.add_mutually_exclusive_group(required=True)
g.add_argument('dump', nargs='?', help='RAM dump obtained from D2 g-code') g.add_argument('dump', nargs='?', help='RAM dump obtained from D2 g-code')
g.add_argument('--map', action='store_true', help='dump global memory map') g.add_argument('--map', action='store_true', help='dump global memory map')
@ -213,7 +215,7 @@ def main():
print_map(grefs) print_map(grefs)
else: else:
addr, data = decode_dump(args.dump) addr, data = decode_dump(args.dump)
annotate_refs(grefs, addr, data) annotate_refs(grefs, addr, data, gaps=not args.no_gaps)
if __name__ == '__main__': if __name__ == '__main__':
exit(main()) exit(main())