* [RFA] Fix PR python/20129 - use of non-existing variable
@ 2016-06-06 17:23 Tom Tromey
2016-06-06 19:05 ` Phil Muldoon
2016-06-29 15:00 ` Yao Qi
0 siblings, 2 replies; 3+ messages in thread
From: Tom Tromey @ 2016-06-06 17:23 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
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-06 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-06 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.
---
gdb/ChangeLog | 7 +++++++
gdb/python/lib/gdb/command/frame_filters.py | 4 ++--
gdb/testsuite/ChangeLog | 6 ++++++
gdb/testsuite/gdb.python/py-framefilter.exp | 6 ++++++
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index af4ddcc..525ec33 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2016-06-06 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-02 Jon Turney <jon.turney@dronecode.org.uk>
* windows-nat.c (handle_output_debug_string): Return type of
diff --git a/gdb/python/lib/gdb/command/frame_filters.py b/gdb/python/lib/gdb/command/frame_filters.py
index c9d4f3e..29c2973 100644
--- a/gdb/python/lib/gdb/command/frame_filters.py
+++ b/gdb/python/lib/gdb/command/frame_filters.py
@@ -150,7 +150,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)
@@ -347,7 +347,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)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3b305a6..6013e78 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-06 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.
+
2016-06-02 Tom Tromey <tom@tromey.com>
PR python/18984:
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index aea4b45..8bbdcd3 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -104,6 +104,9 @@ gdb_test "show frame-filter priority global Elider" \
gdb_test "info frame-filter" \
".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \
"info frame filter after setting priority"
+gdb_test "set frame-filter priority global NoSuchFilter 900" \
+ "frame-filter 'NoSuchFilter' not found." \
+ "set priority of a non-existing filter"
# Test enable/disable
gdb_test "info frame-filter" \
@@ -119,6 +122,9 @@ gdb_test_no_output "enable frame-filter global Elider" \
gdb_test "info frame-filter" \
".*1000.*Yes.*Elider.*100.*Yes.*Reverse.*10.*.*No.*Object.*1.*" \
"info frame filter after reenabling frame filter"
+gdb_test "disable frame-filter global NoSuchFilter" \
+ "frame-filter 'NoSuchFilter' not found." \
+ "disable a non-existing filter"
# Test no-filters
gdb_test "bt no-filters" \
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix PR python/20129 - use of non-existing variable
2016-06-06 17:23 [RFA] Fix PR python/20129 - use of non-existing variable Tom Tromey
@ 2016-06-06 19:05 ` Phil Muldoon
2016-06-29 15:00 ` Yao Qi
1 sibling, 0 replies; 3+ messages in thread
From: Phil Muldoon @ 2016-06-06 19:05 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 06/06/16 18:22, Tom Tromey wrote:
> 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-06 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-06 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.
Tom,
It looks fine to me (and the original a buglet anyway).
Cheers
Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Fix PR python/20129 - use of non-existing variable
2016-06-06 17:23 [RFA] Fix PR python/20129 - use of non-existing variable Tom Tromey
2016-06-06 19:05 ` Phil Muldoon
@ 2016-06-29 15:00 ` Yao Qi
1 sibling, 0 replies; 3+ messages in thread
From: Yao Qi @ 2016-06-29 15:00 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Mon, Jun 6, 2016 at 6:22 PM, Tom Tromey <tom@tromey.com> wrote:
> 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.
>
Patch is good to me.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-29 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 17:23 [RFA] Fix PR python/20129 - use of non-existing variable Tom Tromey
2016-06-06 19:05 ` Phil Muldoon
2016-06-29 15:00 ` Yao Qi
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).