From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH OBV] Remove dead code in regcache::dump
Date: Fri, 24 Nov 2017 14:59:00 -0000 [thread overview]
Message-ID: <1511535582-18721-1-git-send-email-yao.qi@linaro.org> (raw)
footnote_register_size in regcache::dump is a constant zero, so the
condition check against footnote_register_size is dead code. The code
writing to footnote_register_size was removed by 01e1877.
This patche removes footnote_register_size and the dead code.
gdb:
2017-11-24 Yao Qi <yao.qi@linaro.org>
* regcache.c (regcache::dump): Remove footnote_register_size.
---
gdb/ChangeLog | 4 ++++
gdb/regcache.c | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index aecd85b..bec8433 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2017-11-24 Yao Qi <yao.qi@linaro.org>
+ * regcache.c (regcache::dump): Remove footnote_register_size.
+
+2017-11-24 Yao Qi <yao.qi@linaro.org>
+
* regcache.c (cooked_read_test): Add more test for readonly
regcache.
diff --git a/gdb/regcache.c b/gdb/regcache.c
index e82176b..ac905c6 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -1327,7 +1327,6 @@ regcache::dump (ui_file *file, enum regcache_dump_what what_to_dump)
struct gdbarch *gdbarch = m_descr->gdbarch;
int regnum;
int footnote_nr = 0;
- int footnote_register_size = 0;
int footnote_register_offset = 0;
int footnote_register_type_name_null = 0;
long register_offset = 0;
@@ -1539,9 +1538,6 @@ regcache::dump (ui_file *file, enum regcache_dump_what what_to_dump)
fprintf_unfiltered (file, "\n");
}
- if (footnote_register_size)
- fprintf_unfiltered (file, "*%d: Inconsistent register sizes.\n",
- footnote_register_size);
if (footnote_register_offset)
fprintf_unfiltered (file, "*%d: Inconsistent register offsets.\n",
footnote_register_offset);
--
1.9.1
reply other threads:[~2017-11-24 14:59 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=1511535582-18721-1-git-send-email-yao.qi@linaro.org \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).