We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
It would be nice to add some nice __repr__ calls to different classes in elftools. That would make working with the library a bit easier.
__repr__
In [1]: from elftools.elf.elffile import ELFFile In [2]: e = ELFFile(open('./a.out', 'rb')) In [3]: s = e.get_section_by_name('.plt') In [4]: s Out[4]: <elftools.elf.sections.Section at 0x7ffff12843c8> In [5]: s.__dict__ Out[5]: {'header': Container({'sh_name': 135, 'sh_type': 'SHT_PROGBITS', 'sh_flags': 6, 'sh_addr': 1104, 'sh_offset': 1104, 'sh_size': 96, 'sh_link': 0, 'sh_info': 0, 'sh_addralign': 16, 'sh_entsize': 4}), 'name': '.plt', 'elffile': <elftools.elf.elffile.ELFFile at 0x7ffff12cca20>, 'stream': <_io.BufferedReader name='./a.out'>, 'structs': <elftools.elf.structs.ELFStructs at 0x7ffff12cca90>, '_compressed': 0, '_decompressed_size': 96, '_decompressed_align': 16}
For example, the Section could show up as: <Section '.plt' addr=0x450 size=0x60 type='SHT_PROGBITS'>.
Section
<Section '.plt' addr=0x450 size=0x60 type='SHT_PROGBITS'>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
It would be nice to add some nice
__repr__
calls to different classes in elftools. That would make working with the library a bit easier.For example, the
Section
could show up as:<Section '.plt' addr=0x450 size=0x60 type='SHT_PROGBITS'>
.The text was updated successfully, but these errors were encountered: