aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/lib')
-rw-r--r--gdb/python/lib/gdb/FrameIterator.py3
-rw-r--r--gdb/python/lib/gdb/command/explore.py7
-rw-r--r--gdb/python/lib/gdb/command/frame_filters.py6
-rw-r--r--gdb/python/lib/gdb/command/prompt.py2
4 files changed, 5 insertions, 13 deletions
diff --git a/gdb/python/lib/gdb/FrameIterator.py b/gdb/python/lib/gdb/FrameIterator.py
index fccb588..3da1b1f 100644
--- a/gdb/python/lib/gdb/FrameIterator.py
+++ b/gdb/python/lib/gdb/FrameIterator.py
@@ -13,9 +13,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import gdb
-import itertools
-
class FrameIterator(object):
"""A gdb.Frame iterator. Iterates over gdb.Frames or objects that
diff --git a/gdb/python/lib/gdb/command/explore.py b/gdb/python/lib/gdb/command/explore.py
index 3b76d36..3b930fb 100644
--- a/gdb/python/lib/gdb/command/explore.py
+++ b/gdb/python/lib/gdb/command/explore.py
@@ -523,7 +523,6 @@ class CompoundExplorer(object):
else:
print("'%s' is a %s with the following " "fields:\n" % (name, type_desc))
- has_explorable_fields = False
current_choice = 0
choice_to_compound_field_map = {}
print_list = []
@@ -694,7 +693,7 @@ class ExploreCommand(gdb.Command):
)
def invoke(self, arg_str, from_tty):
- if ExploreUtils.check_args("explore", arg_str) == False:
+ if ExploreUtils.check_args("explore", arg_str) is False:
return
# Check if it is a value
@@ -733,7 +732,7 @@ class ExploreValueCommand(gdb.Command):
)
def invoke(self, arg_str, from_tty):
- if ExploreUtils.check_args("explore value", arg_str) == False:
+ if ExploreUtils.check_args("explore value", arg_str) is False:
return
value = ExploreUtils.get_value_from_str(arg_str)
@@ -764,7 +763,7 @@ class ExploreTypeCommand(gdb.Command):
)
def invoke(self, arg_str, from_tty):
- if ExploreUtils.check_args("explore type", arg_str) == False:
+ if ExploreUtils.check_args("explore type", arg_str) is False:
return
datatype = ExploreUtils.get_type_from_str(arg_str)
diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py
index 97488ca..5ea562e 100644
--- a/gdb/python/lib/gdb/command/frame_filters.py
+++ b/gdb/python/lib/gdb/command/frame_filters.py
@@ -18,11 +18,7 @@
import sys
import gdb
-import copy
-from gdb.FrameIterator import FrameIterator
-from gdb.FrameDecorator import FrameDecorator
import gdb.frames
-import itertools
# GDB Commands.
class SetFilterPrefixCmd(gdb.Command):
@@ -176,7 +172,7 @@ def _complete_frame_filter_list(text, word, all_flag):
from text/word analysis. This list can be empty when there
are no suggestions for completion.
"""
- if all_flag == True:
+ if all_flag:
filter_locations = ["all", "global", "progspace"]
else:
filter_locations = ["global", "progspace"]
diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py
index 6e105a3..b001cc1 100644
--- a/gdb/python/lib/gdb/command/prompt.py
+++ b/gdb/python/lib/gdb/command/prompt.py
@@ -52,7 +52,7 @@ class _ExtendedPrompt(gdb.Parameter):
return "The extended prompt is not set."
def get_set_string(self):
- if self.hook_set == False:
+ if self.hook_set is False:
gdb.prompt_hook = self.before_prompt_hook
self.hook_set = True
return ""