gdb/riscv: Provide non-DWARF stack unwinder
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 17 Jul 2018 14:22:39 +0000 (15:22 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 3 Sep 2018 14:48:41 +0000 (15:48 +0100)
commit78a3b0fab8200fdca2b1b934645c29e7bd502d36
tree0f57ab94388e5de1d76e4ccd56045f3b40fa49fd
parent23e60e7a4ea772eabb6ae4788913e228763755cf
gdb/riscv: Provide non-DWARF stack unwinder

Collects information during the prologue scan and uses this to unwind
registers when no DWARF information is available.

This patch has been tested by disabling the DWARF stack unwinders, and
running the complete GDB testsuite against a range of RISC-V targets.
The results are comparable to running with the DWARF unwinders in
place.

gdb/ChangeLog:

* riscv-tdep.c: Add 'prologue-value.h' include.
(struct riscv_unwind_cache): New struct.
(riscv_debug_unwinder): New global.
(riscv_scan_prologue): Update arguments, capture register details
from prologue scan.
(riscv_skip_prologue): Reformat arguments line, move end of
prologue calculation into riscv_scan_prologue.
(riscv_frame_cache): Update return type, create
riscv_unwind_cache, scan the prologue, and fill in remaining cache
details.
(riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
(riscv_frame_prev_register): Use the trad_frame within the
riscv_unwind_cache.
(_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
flag.
gdb/ChangeLog
gdb/riscv-tdep.c
gdb/riscv-tdep.h
This page took 0.02632 seconds and 4 git commands to generate.