gdb/or1k: Add linux debugging support
authorStafford Horne <shorne@gmail.com>
Fri, 7 Dec 2018 22:01:40 +0000 (07:01 +0900)
committerStafford Horne <shorne@gmail.com>
Fri, 7 Dec 2018 22:07:36 +0000 (07:07 +0900)
commit42e151bf4cc66b8781f2b139c6da320095f9a045
tree3004954c0eb750ed1414e3751f882c9797b533ee
parentf50fabe4f66534c9addacddeaa439e8d164eadda
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.
bfd/ChangeLog
bfd/elf32-or1k.c
gdb/ChangeLog
gdb/Makefile.in
gdb/configure.tgt
gdb/or1k-linux-tdep.c [new file with mode: 0644]
gdb/or1k-tdep.c