diff options
author | Feiyang Chen <chenfeiyang@loongson.cn> | 2024-01-25 16:32:36 +0800 |
---|---|---|
committer | Tiezhu Yang <yangtiezhu@loongson.cn> | 2024-02-06 18:40:19 +0800 |
commit | e4d74c01e77365f1327e4e567e7579cdd3bf74f6 (patch) | |
tree | 57a80ffa2ea61b4754b9d71f89fcee012966bf05 /gdb/arch/loongarch.c | |
parent | 1e9569f383a3d5a88ee07d0c2401bd95613c222e (diff) | |
download | gdb-e4d74c01e77365f1327e4e567e7579cdd3bf74f6.zip gdb-e4d74c01e77365f1327e4e567e7579cdd3bf74f6.tar.gz gdb-e4d74c01e77365f1327e4e567e7579cdd3bf74f6.tar.bz2 |
gdb: LoongArch: Add LBT extension support
Loongson Binary Translation (LBT) is used to accelerate binary
translation, which contains 4 scratch registers (scr0 to scr3),
x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop). This
patch support gdb to fetch/store these registers.
Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> # Framework
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> # Detail Optimizes
Signed-off-by: Hui Li <lihui@loongson.cn> # Error Fixes
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdb/arch/loongarch.c')
-rw-r--r-- | gdb/arch/loongarch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/arch/loongarch.c b/gdb/arch/loongarch.c index e9995c9..22f2d39 100644 --- a/gdb/arch/loongarch.c +++ b/gdb/arch/loongarch.c @@ -27,6 +27,7 @@ #include "../features/loongarch/fpu.c" #include "../features/loongarch/lsx.c" #include "../features/loongarch/lasx.c" +#include "../features/loongarch/lbt.c" #ifndef GDBSERVER #define STATIC_IN_GDB static @@ -69,6 +70,9 @@ loongarch_create_target_description (const struct loongarch_gdbarch_features fea regnum = create_feature_loongarch_lsx (tdesc.get (), regnum); regnum = create_feature_loongarch_lasx (tdesc.get (), regnum); + /* For now we only support creating scr registers, eflags and ftop. */ + regnum = create_feature_loongarch_lbt (tdesc.get (), regnum); + return tdesc; } |