diff options
author | Jiangshuai Li <jiangshuai_li@linux.alibaba.com> | 2022-11-09 19:41:02 +0800 |
---|---|---|
committer | Jiangshuai Li <jiangshuai_li@linux.alibaba.com> | 2022-11-21 09:54:37 +0800 |
commit | e710dfe0cf3be7cd87ba397ffa6c74706d8ecbfb (patch) | |
tree | 038a7d1ebd6797783988c892d610960347b44373 /gdb | |
parent | 01919ca385ed2e211a3c83b6a9151a1e92a584e7 (diff) | |
download | gdb-e710dfe0cf3be7cd87ba397ffa6c74706d8ecbfb.zip gdb-e710dfe0cf3be7cd87ba397ffa6c74706d8ecbfb.tar.gz gdb-e710dfe0cf3be7cd87ba397ffa6c74706d8ecbfb.tar.bz2 |
gdb/csky return type int32 for float and vector pseudo regs
When reg_nr is one of the float and vector pseudo registers,
return builtin_type (gdbarch)->builtin_int32 for it.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/csky-tdep.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index e377e37..ced1b03 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -700,6 +700,17 @@ csky_vector_type (struct gdbarch *gdbarch) static struct type * csky_register_type (struct gdbarch *gdbarch, int reg_nr) { + int num_regs = gdbarch_num_regs (gdbarch); + csky_gdbarch_tdep *tdep + = gdbarch_tdep<csky_gdbarch_tdep> (gdbarch); + + if (tdep->fv_pseudo_registers_count) + { + if ((reg_nr >= num_regs) + && (reg_nr < (num_regs + tdep->fv_pseudo_registers_count))) + return builtin_type (gdbarch)->builtin_int32; + } + /* If type has been described in tdesc-xml, use it. */ if (tdesc_has_registers (gdbarch_target_desc (gdbarch))) { |