aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/lib
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-06-06 11:21:15 -0600
committerTom Tromey <tom@tromey.com>2016-06-29 10:18:38 -0600
commit803b47e5d4dc86b953aba0bc44865de287726dbe (patch)
tree801834576d7edef30ddd2b02e758bd6415276a94 /gdb/python/lib
parent9d78f827e0da9ab6fda2d6ef2d59cebb805b411f (diff)
downloadgdb-803b47e5d4dc86b953aba0bc44865de287726dbe.zip
gdb-803b47e5d4dc86b953aba0bc44865de287726dbe.tar.gz
gdb-803b47e5d4dc86b953aba0bc44865de287726dbe.tar.bz2
Fix PR python/20129 - use of non-existing variable
PR python/20129 concerns the error message one gets from a command like "disable frame-filter global NoSuchFilter". Currently this throws a second, unexpected, exception due to the use of a non-existing variable named "name". This patch adds regression tests and fixes a couple of spots to use the correct variable name. Built and regtested on x86-64 Fedora 23. 2016-06-29 Tom Tromey <tom@tromey.com> PR python/20129: * python/lib/gdb/command/frame_filters.py (_do_enable_frame_filter) (SetFrameFilterPriority._set_filter_priority): Use "frame_filter", not "name". 2016-06-29 Tom Tromey <tom@tromey.com> PR python/20129: * gdb.python/py-framefilter.exp: Add tests for setting priority and disabling of non-existent frame filter.
Diffstat (limited to 'gdb/python/lib')
-rw-r--r--gdb/python/lib/gdb/command/frame_filters.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py
index a5fb0a6..8d26000 100644
--- a/gdb/python/lib/gdb/command/frame_filters.py
+++ b/gdb/python/lib/gdb/command/frame_filters.py
@@ -142,7 +142,7 @@ def _do_enable_frame_filter(command_tuple, flag):
try:
ff = op_list[frame_filter]
except KeyError:
- msg = "frame-filter '" + str(name) + "' not found."
+ msg = "frame-filter '" + str(frame_filter) + "' not found."
raise gdb.GdbError(msg)
gdb.frames.set_enabled(ff, flag)
@@ -339,7 +339,7 @@ class SetFrameFilterPriority(gdb.Command):
try:
ff = op_list[frame_filter]
except KeyError:
- msg = "frame-filter '" + str(name) + "' not found."
+ msg = "frame-filter '" + str(frame_filter) + "' not found."
raise gdb.GdbError(msg)
gdb.frames.set_priority(ff, priority)