diff options
author | Stafford Horne <shorne@gmail.com> | 2018-12-08 07:01:40 +0900 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2018-12-08 07:07:36 +0900 |
commit | 42e151bf4cc66b8781f2b139c6da320095f9a045 (patch) | |
tree | 3004954c0eb750ed1414e3751f882c9797b533ee /gdb/or1k-tdep.c | |
parent | f50fabe4f66534c9addacddeaa439e8d164eadda (diff) | |
download | gdb-42e151bf4cc66b8781f2b139c6da320095f9a045.zip gdb-42e151bf4cc66b8781f2b139c6da320095f9a045.tar.gz gdb-42e151bf4cc66b8781f2b139c6da320095f9a045.tar.bz2 |
gdb/or1k: Add linux debugging support
Up until now OpenRISC GDB only has supported bare metal debugging. This
patch adds linux userspace debugging and core dump analysis support.
The changes are loosely based on nios2 and riscv implementations.
This was tested with linux 4.20 core dumps for executables linked
against musl libc.
bfd/ChangeLog:
* elf32-or1k.c (or1k_grok_prstatus): New function.
(or1k_grok_psinfo): Likewise.
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
* configure.tgt: Add or1k*-*-linux*.
* or1k-linux-tdep.c: New file.
* or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
Diffstat (limited to 'gdb/or1k-tdep.c')
-rw-r--r-- | gdb/or1k-tdep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index a9ef44b..1949605 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -1256,6 +1256,9 @@ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdesc_use_registers (gdbarch, tdesc, tdesc_data); } + /* Hook in ABI-specific overrides, if they have been registered. */ + gdbarch_init_osabi (info, gdbarch); + return gdbarch; } |