From: Jiangshuai Li via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Jiangshuai Li <jiangshuai_li@linux.alibaba.com>
Subject: [PATCH] gdb/csky rm csky_print_registers_info
Date: Wed, 31 Aug 2022 19:57:42 +0800 [thread overview]
Message-ID: <20220831115742.8986-1-jiangshuai_li@linux.alibaba.com> (raw)
The reason for implementing this interface is that we want to print
GPR, PC, EPC, PSR and EPSR when the info register command is
executed.
A prev patch had added PC, EPC, PSR and EPSR to reggroup general_group,
the purpose has been achieved, this function is no longer required.
---
gdb/csky-tdep.c | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index ba53c1b10ca..2d07c6be2ff 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -2590,30 +2590,6 @@ csky_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dw_reg)
return -1;
}
-/* Override interface for command: info register. */
-
-static void
-csky_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
- struct frame_info *frame, int regnum, int all)
-{
- /* Call default print_registers_info function. */
- default_print_registers_info (gdbarch, file, frame, regnum, all);
-
- /* For command: info register. */
- if (regnum == -1 && all == 0)
- {
- default_print_registers_info (gdbarch, file, frame,
- CSKY_PC_REGNUM, 0);
- default_print_registers_info (gdbarch, file, frame,
- CSKY_EPC_REGNUM, 0);
- default_print_registers_info (gdbarch, file, frame,
- CSKY_CR0_REGNUM, 0);
- default_print_registers_info (gdbarch, file, frame,
- CSKY_EPSR_REGNUM, 0);
- }
- return;
-}
-
/* Check whether xml has discribled the essential regs. */
static int
@@ -2989,7 +2965,6 @@ csky_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_type (gdbarch, csky_register_type);
set_gdbarch_read_pc (gdbarch, csky_read_pc);
set_gdbarch_write_pc (gdbarch, csky_write_pc);
- set_gdbarch_print_registers_info (gdbarch, csky_print_registers_info);
csky_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, csky_register_reggroup_p);
set_gdbarch_stab_reg_to_regnum (gdbarch, csky_dwarf_reg_to_regnum);
--
2.25.1
reply other threads:[~2022-08-31 11: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=20220831115742.8986-1-jiangshuai_li@linux.alibaba.com \
--to=gdb-patches@sourceware.org \
--cc=jiangshuai_li@linux.alibaba.com \
/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: link
Be 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