riscv: Add SW single-step support for KDB

In KGDB, the GDB in the host is responsible for the single-step operation
of the software. In other words, KGDB does not need to derive the next pc
address when performing a software single-step operation. KGDB just inserts
the break instruction at the indicated address according to the GDB
instructions. This approach does not work in KDB because the GDB does not
involve the KDB process. Therefore, this patch provides KDB a software
single-step mechanism to use.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Vincent Chen 2020-04-16 10:38:08 +08:00 • committed by Palmer Dabbelt
commit edde5584c7
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889
2 changed files with 396 additions and 2 deletions