Omar Sandoval
98a26ad610
corereader: add CoreReader.read_c_string()
...
And replace the Python implementation in ProgramObject.string_(). The
CoreReader implementation is still naive in that it reads byte-by-byte,
but this could always be improved in the future.
2018-07-23 18:19:41 -07:00
Omar Sandoval
6abb2f2402
Separate internal API from public API
...
While we're here, clean up some rough edges of the API and document a
lot more.
2018-07-14 10:20:17 -07:00
Omar Sandoval
6a6d37c5e1
Make Program and CoreReader context managers
...
This is preparation for the next change, so that a Program can clean up
after itself. The Program will close the CoreReader, and the CoreReader
will close the underlying file.
2018-07-11 19:16:34 -07:00
Omar Sandoval
800ee3ec36
corereader: take fd and list of segments instead of path
...
Now, we can get rid of the ELF parsing implementation in CoreReader.
Instead, we parse in ElfFile and pass the parsed information to
CoreReader.
2018-07-09 19:12:33 -07:00
Omar Sandoval
306862167d
corereader: handle segments with p_filesz < p_memsz
...
The extra is defined to be zero-filled.
2018-07-06 19:28:20 -07:00
Omar Sandoval
a22f4b7d4f
corereader: save segments as Elf64_Phdr
...
This is preparation for the following two changes.
2018-07-06 18:01:57 -07:00
Omar Sandoval
0adac0747c
Bring back ElfFile
...
Instead of constructing DwarfFile with a dict of sections, pass in an
ElfFile.
2018-06-25 23:43:14 -07:00
Omar Sandoval
95bde56cb7
Implement core dump reading in C
...
read_memory() is one of the hottest functions in profiles of tight loops
over lists of items, and it can be done much more efficiently in C.
2018-05-24 17:55:47 -07:00