riscv: Add SW single-step support for KDB
authorVincent Chen <vincent.chen@sifive.com>
Thu, 16 Apr 2020 02:38:08 +0000 (10:38 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 18 May 2020 18:38:12 +0000 (11:38 -0700)
commitedde5584c7ab5d18b87f092fe6fe8a72590e7100
tree62900d9ef5b9aae651ed7a5132d178339bac5d6f
parentd96575709cc7056f34fdd5cdc16bcffe5bdb573d
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>
arch/riscv/include/asm/parse_asm.h [new file with mode: 0644]
arch/riscv/kernel/kgdb.c