drgn/libdrgn/python
Omar Sandoval b899a10836 Remove register numbers from API and add register aliases
enum drgn_register_number in the public libdrgn API and
drgn.Register.number in the Python bindings are basically exports of
DWARF register numbers. They only exist as a way to identify registers
that's lighter weight than string lookups. libdrgn already has struct
drgn_register, so we can use that to identify registers in the public
API and remove enum drgn_register_number. This has a couple of benefits:
we don't depend on DWARF numbering in our API, and we don't have to
generate drgn.h from the architecture files. The Python bindings can
just use string names for now. If it seems useful, StackFrame.register()
can take a Register in the future, we'll just need to be careful to not
allow Registers from the wrong platform.

While we're changing the API anyways, also change it so that registers
have a list of names instead of one name. This isn't needed for x86-64
at the moment, but will be for architectures that have multiple names
for the same register (like ARM).

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-01-28 17:47:45 -08:00
..
drgnpy.h Remove register numbers from API and add register aliases 2021-01-28 17:47:45 -08:00
error.c libdrgn: rename "unavailable" objects to "absent" objects 2020-12-29 14:58:26 -08:00
helpers.c libdrgn: python: define Py_RETURN_BOOL 2021-01-28 11:35:09 -08:00
language.c Update copyright headers to Facebook and add missing headers 2020-05-15 15:13:02 -07:00
module.c Remove register numbers from API and add register aliases 2021-01-28 17:47:45 -08:00
object.c libdrgn: python: define Py_RETURN_BOOL 2021-01-28 11:35:09 -08:00
platform.c Remove register numbers from API and add register aliases 2021-01-28 17:47:45 -08:00
program.c libdrgn: get rid of struct drgn_stack_frame 2021-01-27 11:22:34 -08:00
stack_trace.c Remove register numbers from API and add register aliases 2021-01-28 17:47:45 -08:00
symbol.c libdrgn: python: define Py_RETURN_BOOL 2021-01-28 11:35:09 -08:00
test.c Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
type.c libdrgn: python: define Py_RETURN_BOOL 2021-01-28 11:35:09 -08:00
util.c libdrgn: replace lazy types with lazy objects 2021-01-08 17:39:51 -08:00