Add tomstone proto support for riscv64
Signed-off-by: Liu Cunyuan <liucunyuan.lcy@linux.alibaba.com> Signed-off-by: Mao Han <han_mao@linux.alibaba.com> Change-Id: Ie22c2895fc30fab68eddc18713c80e403f44b203
This commit is contained in:
parent
a22af66e4b
commit
8c0101b971
3 changed files with 12 additions and 1 deletions
|
@ -82,6 +82,8 @@ static Architecture get_arch() {
|
|||
return Architecture::X86;
|
||||
#elif defined(__x86_64__)
|
||||
return Architecture::X86_64;
|
||||
#elif defined(__riscv) && (__riscv_xlen == 64)
|
||||
return Architecture::RISCV64;
|
||||
#else
|
||||
#error Unknown architecture!
|
||||
#endif
|
||||
|
|
|
@ -47,6 +47,8 @@ static const char* abi_string(const Tombstone& tombstone) {
|
|||
return "arm";
|
||||
case Architecture::ARM64:
|
||||
return "arm64";
|
||||
case Architecture::RISCV64:
|
||||
return "riscv64";
|
||||
case Architecture::X86:
|
||||
return "x86";
|
||||
case Architecture::X86_64:
|
||||
|
@ -62,6 +64,8 @@ static int pointer_width(const Tombstone& tombstone) {
|
|||
return 4;
|
||||
case Architecture::ARM64:
|
||||
return 8;
|
||||
case Architecture::RISCV64:
|
||||
return 8;
|
||||
case Architecture::X86:
|
||||
return 4;
|
||||
case Architecture::X86_64:
|
||||
|
@ -119,6 +123,10 @@ static void print_thread_registers(CallbackType callback, const Tombstone& tombs
|
|||
special_registers = {"ip", "lr", "sp", "pc", "pst"};
|
||||
break;
|
||||
|
||||
case Architecture::RISCV64:
|
||||
special_registers = {"ra", "sp", "pc"};
|
||||
break;
|
||||
|
||||
case Architecture::X86:
|
||||
special_registers = {"ebp", "esp", "eip"};
|
||||
break;
|
||||
|
|
|
@ -48,8 +48,9 @@ enum Architecture {
|
|||
ARM64 = 1;
|
||||
X86 = 2;
|
||||
X86_64 = 3;
|
||||
RISCV64 = 4;
|
||||
|
||||
reserved 4 to 999;
|
||||
reserved 5 to 999;
|
||||
}
|
||||
|
||||
message Signal {
|
||||
|
|
Loading…
Reference in a new issue