* [PR python/18291] Fix printing of "disabled" status of xmethod matchers.
@ 2015-04-26 14:02 Siva Chandra
2015-05-04 23:40 ` Siva Chandra
0 siblings, 1 reply; 4+ messages in thread
From: Siva Chandra @ 2015-04-26 14:02 UTC (permalink / raw)
To: gdb-patches; +Cc: Doug Evans
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
gdb/ChangeLog:
2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
PR python/18291
* python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
Print xmethod matcher status.
gdb/testsuite/ChangeLog:
2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
PR python/18291
* gdb.python/py-xmethods.exp: Add tests.
[-- Attachment #2: pr18291_v1.txt --]
[-- Type: text/plain, Size: 1579 bytes --]
diff --git a/gdb/python/lib/gdb/command/xmethods.py b/gdb/python/lib/gdb/command/xmethods.py
index 37ed2c1..0788a81 100644
--- a/gdb/python/lib/gdb/command/xmethods.py
+++ b/gdb/python/lib/gdb/command/xmethods.py
@@ -117,7 +117,7 @@ def get_method_matchers_in_loci(loci, locus_re, matcher_re):
def print_xm_info(xm_dict, name_re):
"""Print a dictionary of xmethods."""
- def get_status_string(method):
+ def get_status_string(m):
if not m.enabled:
return " [disabled]"
else:
@@ -130,7 +130,7 @@ def print_xm_info(xm_dict, name_re):
continue
print ("Xmethods in %s:" % locus_str)
for matcher in xm_dict[locus_str]:
- print (" %s" % matcher.name)
+ print (" %s%s" % (matcher.name, get_status_string(matcher)))
if not matcher.methods:
continue
for m in matcher.methods:
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index a83b14d..f0236c0 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -149,3 +149,6 @@ gdb_test_no_output "disable xmethod progspace E_methods;method_int" \
"disable xmethod progspace E_methods;method_int"
gdb_test "info xmethod progspace E_methods;method_int" ".* \\\[disabled\\\]" \
"info xmethod xmethods E_methods;method_int"
+gdb_test_no_output "disable xmethod progspace G_methods" "Disable G_methods 2"
+gdb_test "info xmethod progspace" ".*G_methods \\\[disabled\\\].*" \
+ "info xmethod progspace"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR python/18291] Fix printing of "disabled" status of xmethod matchers.
2015-04-26 14:02 [PR python/18291] Fix printing of "disabled" status of xmethod matchers Siva Chandra
@ 2015-05-04 23:40 ` Siva Chandra
0 siblings, 0 replies; 4+ messages in thread
From: Siva Chandra @ 2015-05-04 23:40 UTC (permalink / raw)
To: gdb-patches; +Cc: Doug Evans
Ping.
On Sun, Apr 26, 2015 at 7:02 AM, Siva Chandra <sivachandra@google.com> wrote:
> gdb/ChangeLog:
>
> 2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
>
> PR python/18291
> * python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
> Print xmethod matcher status.
>
> gdb/testsuite/ChangeLog:
>
> 2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
>
> PR python/18291
> * gdb.python/py-xmethods.exp: Add tests.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR python/18291] Fix printing of "disabled" status of xmethod matchers.
2015-05-07 16:26 Doug Evans
@ 2015-05-09 13:53 ` Siva Chandra
0 siblings, 0 replies; 4+ messages in thread
From: Siva Chandra @ 2015-05-09 13:53 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Thu, May 7, 2015 at 9:26 AM, Doug Evans <dje@google.com> wrote:
> Siva Chandra writes:
> > gdb/ChangeLog:
> >
> > 2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
> >
> > PR python/18291
> > * python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
> > Print xmethod matcher status.
> >
> > gdb/testsuite/ChangeLog:
> >
> > 2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
> >
> > PR python/18291
> > * gdb.python/py-xmethods.exp: Add tests.
>
> LGTM.
>
> [Thanks for the ping. Keep 'em coming! :-)]
Thanks for review. I have now committed this as
df2eb078c0a88a44c49de7045a1c163f380a7efc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR python/18291] Fix printing of "disabled" status of xmethod matchers.
@ 2015-05-07 16:26 Doug Evans
2015-05-09 13:53 ` Siva Chandra
0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans @ 2015-05-07 16:26 UTC (permalink / raw)
To: Siva Chandra; +Cc: gdb-patches
Siva Chandra writes:
> gdb/ChangeLog:
>
> 2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
>
> PR python/18291
> * python/lib/gdb/command/xmethods.py (print_xm_info): Fix typo.
> Print xmethod matcher status.
>
> gdb/testsuite/ChangeLog:
>
> 2015-04-26 Siva Chandra Reddy <sivachandra@google.com>
>
> PR python/18291
> * gdb.python/py-xmethods.exp: Add tests.
LGTM.
[Thanks for the ping. Keep 'em coming! :-)]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-09 13:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-26 14:02 [PR python/18291] Fix printing of "disabled" status of xmethod matchers Siva Chandra
2015-05-04 23:40 ` Siva Chandra
2015-05-07 16:26 Doug Evans
2015-05-09 13:53 ` Siva Chandra
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).