diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/source.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/subst.exp | 8 |
4 files changed, 20 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bda46b5..698c15c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2014-06-03 Brad Mouring <bmouring@ni.com> (tiny patch) + + Pushed by Joel Brobecker <brobecker@adacore.com> + * source.c (show_substitute_path_command): Fix display of matching + substitution rules. + 2014-06-03 Gary Benson <gbenson@redhat.com> * gnu-v2-abi.c (gnuv2_value_rtti_type): Use gdb_demangle. diff --git a/gdb/source.c b/gdb/source.c index c985a1b..14b1f71 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1890,7 +1890,7 @@ show_substitute_path_command (char *args, int from_tty) while (rule != NULL) { - if (from == NULL || FILENAME_CMP (rule->from, from) == 0) + if (from == NULL || substitute_path_rule_matches (rule, from) != 0) printf_filtered (" `%s' -> `%s'.\n", rule->from, rule->to); rule = rule->next; } diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8217403..40518b6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-06-03 Brad Mouring <bmouring@ni.com> (tiny patch) + + * gdb.base/subst.exp: Add tests to verify partial path matching + output. + 2014-06-03 Pedro Alves <palves@redhat.com> * gdb.base/sss-bp-on-user-bp-2.exp: Skip if testing with a remote diff --git a/gdb/testsuite/gdb.base/subst.exp b/gdb/testsuite/gdb.base/subst.exp index e132809..e99735b 100644 --- a/gdb/testsuite/gdb.base/subst.exp +++ b/gdb/testsuite/gdb.base/subst.exp @@ -95,6 +95,14 @@ gdb_test "show substitute-path depuis" \ "Source path substitution rule matching `depuis':\r\n +`depuis' -> `vers'." \ "show substitute-path depuis, after all paths added" +gdb_test "show substitute-path from/path" \ + "Source path substitution rule matching `from/path':\r\n +`from' -> `to'." \ + "show substitute-path from/path, after all paths added" + +gdb_test "show substitute-path from_a_bad_path" \ + "Source path substitution rule matching `from_a_bad_path':" \ + "show substitute-path from_a_bad_path, after all paths added" + gdb_test "show substitute-path garbage" \ "Source path substitution rule matching `garbage':" \ "show substitute-path garbage, after all paths added" |