From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 1/9] gdb: remove invalid / dead code from gdbarch.py
Date: Thu, 23 Feb 2023 17:18:22 -0500 [thread overview]
Message-ID: <20230223221830.499934-2-simon.marchi@efficios.com> (raw)
In-Reply-To: <20230223221830.499934-1-simon.marchi@efficios.com>
My editor flagged that the variable `c` (in the lines removed by this
patch) was unknown. I guess it ends up working because there is a `c`
variable in the global scope. I tried putting `assert False` inside
that if, and it is not hit, showing that we never enter this if. So,
remove it. There is no change in the generated files.
Change-Id: Id3b9f67719e88cada7c6fde673c8d7842ab13617
---
gdb/gdbarch.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/gdb/gdbarch.py b/gdb/gdbarch.py
index 3ebc35980472..68c7bbae6618 100755
--- a/gdb/gdbarch.py
+++ b/gdb/gdbarch.py
@@ -64,8 +64,6 @@ class _Component:
assert self.predicate and not isinstance(self.invalid, str)
if self.predefault:
predicate = f"gdbarch->{self.name} != {self.predefault}"
- elif isinstance(c, Value):
- predicate = f"gdbarch->{self.name} != 0"
else:
predicate = f"gdbarch->{self.name} != NULL"
return predicate
--
2.39.2
next prev parent reply other threads:[~2023-02-23 22:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 22:18 [PATCH 0/9] Add typing annotations to gdbarch*.py and make-target-delegates.py Simon Marchi
2023-02-23 22:18 ` Simon Marchi [this message]
2023-02-23 22:18 ` [PATCH 2/9] gdb: reformat Python files with black 23.1.0 Simon Marchi
2023-02-23 22:18 ` [PATCH 3/9] gdb: gdbarch.py: spell out parameters of _Component.__init__ Simon Marchi
2023-02-24 19:51 ` Tom Tromey
2023-02-24 20:31 ` Simon Marchi
2023-02-24 22:07 ` Tom Tromey
2023-02-23 22:18 ` [PATCH 4/9] gdb: pyproject.toml: set pyright typeCheckingMode = "strict" Simon Marchi
2023-02-23 22:18 ` [PATCH 5/9] gdb: split gdbarch component types to gdbarch_types.py Simon Marchi
2023-02-23 22:18 ` [PATCH 6/9] gdb: gdbarch*.py, copyright.py: add type annotations Simon Marchi
2023-02-23 22:18 ` [PATCH 7/9] gdb: make-target-delegates.py: make one string raw Simon Marchi
2023-02-23 22:18 ` [PATCH 8/9] gdb: make-target-delegates.py: add Entry type Simon Marchi
2023-02-23 22:18 ` [PATCH 9/9] gdb: make-target-delegates.py: add type annotations Simon Marchi
2023-02-24 19:54 ` [PATCH 0/9] Add typing annotations to gdbarch*.py and make-target-delegates.py Tom Tromey
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=20230223221830.499934-2-simon.marchi@efficios.com \
--to=simon.marchi@efficios.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).