public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Jiangshuai Li <jiangshuaili@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/csky return type int32 for float and vector pseudo regs Date: Mon, 21 Nov 2022 01:58:07 +0000 (GMT) [thread overview] Message-ID: <20221121015807.D66853858C52@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e710dfe0cf3be7cd87ba397ffa6c74706d8ecbfb commit e710dfe0cf3be7cd87ba397ffa6c74706d8ecbfb Author: Jiangshuai Li <jiangshuai_li@linux.alibaba.com> Date: Wed Nov 9 19:41:02 2022 +0800 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. Diff: --- gdb/csky-tdep.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index e377e37b26e..ced1b032a7b 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))) {
reply other threads:[~2022-11-21 1:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221121015807.D66853858C52@sourceware.org \ --to=jiangshuaili@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).