diff options
author | Siva Chandra <sivachandra@chromium.org> | 2014-06-18 03:46:37 -0700 |
---|---|---|
committer | Siva Chandra <sivachandra@chromium.org> | 2014-06-23 04:57:51 -0700 |
commit | 70afc5b72d36dabf0a152e219ac981b2b45c138a (patch) | |
tree | 8115c8f9c2bbf762873a7b05c7c5c99473743c7c /gdb/testsuite/gdb.python/py-xmethods.exp | |
parent | b972bd9c133c8acd3f5ce8d05a4fdfc85aee2c15 (diff) | |
download | binutils-gdb-70afc5b72d36dabf0a152e219ac981b2b45c138a.tar.gz |
Align behavior of xmethod commands with that of pretty-printer commands.
Currently, the xmethod commands lookup xmethod matchers in the current
progspace even if the locus regular expression matches the progspace's
filename. Pretty printer commands do not match the current progspace's
filename.
gdb/
* python/lib/gdb/command/xmethods.py
(get_method_matchers_in_loci): Lookup xmethod matchers in the
current progspace only if the string "progspace" matches LOCUS_RE.
gdb/testsuite
* gdb.python/py-xmethods.exp: Use "progspace" instead of the
progspace's filename in 'info', 'enable' and 'disable' command
tests.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-xmethods.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-xmethods.exp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp index a455a7a3f82..8824127f519 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.exp +++ b/gdb/testsuite/gdb.python/py-xmethods.exp @@ -125,19 +125,19 @@ gdb_test "p g_ptr->mul<char>('a')" "From Python G<>::mul.*" \ "After: g_ptr->mul<char>('a')" # Tests for 'disable/enable xmethod' command. -gdb_test_no_output "disable xmethod .*xmethods G_methods" \ +gdb_test_no_output "disable xmethod progspace G_methods" \ "Disable G_methods" gdb_test "p g.mul<char>('a')" "Couldn't find method.*" \ "g.mul<char>('a') after disabling G_methods" -gdb_test_no_output "enable xmethod .*xmethods G_methods" \ +gdb_test_no_output "enable xmethod progspace G_methods" \ "Enable G_methods" gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \ "After enabling G_methods" -gdb_test_no_output "disable xmethod .*xmethods G_methods;mul" \ +gdb_test_no_output "disable xmethod progspace G_methods;mul" \ "Disable G_methods;mul" gdb_test "p g.mul<char>('a')" "Couldn't find method.*" \ "g.mul<char>('a') after disabling G_methods;mul" -gdb_test_no_output "enable xmethod .*xmethods G_methods;mul" \ +gdb_test_no_output "enable xmethod progspace G_methods;mul" \ "Enable G_methods;mul" gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \ "After enabling G_methods;mul" @@ -145,9 +145,9 @@ gdb_test "p g.mul<char>('a')" "From Python G<>::mul.*" \ # Test for 'info xmethods' command gdb_test "info xmethod global plus" "global.*plus_plus_A" \ "info xmethod global plus 1" -gdb_test_no_output "disable xmethod .*xmethods E_methods;method_int" \ - "disable xmethod .*xmethods E_methods;method_int" -gdb_test "info xmethod .*xmethods E_methods;method_int" ".* \\\[disabled\\\]" \ +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" remote_file host delete ${xmethods_script} |