aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-02-26 20:13:54 -0500
committerSimon Marchi <simon.marchi@efficios.com>2023-02-27 13:28:32 -0500
commitaa992b382f91f426cd51bf1375d78eacb509f2cc (patch)
tree41e08d02ba61104c0a7f5656a1465ef94216b217
parentdebd0556e519c3d258299cf5f14a44cc01c795da (diff)
downloadfsf-binutils-gdb-aa992b382f91f426cd51bf1375d78eacb509f2cc.zip
fsf-binutils-gdb-aa992b382f91f426cd51bf1375d78eacb509f2cc.tar.gz
fsf-binutils-gdb-aa992b382f91f426cd51bf1375d78eacb509f2cc.tar.bz2
gdb: remove invalid / dead code from gdbarch.py
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 Reviewed-By: Tom Tromey <tom@tromey.com> Reviewed-By: Andrew Burgess <aburgess@redhat.com>
-rwxr-xr-xgdb/gdbarch.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/gdbarch.py b/gdb/gdbarch.py
index 3ebc359..68c7bba 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