Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb/source.c: Fix source path substitution
@ 2014-05-23 21:02 Brad Mouring
  2014-05-23 23:50 ` Joel Brobecker
  0 siblings, 1 reply; 16+ messages in thread
From: Brad Mouring @ 2014-05-23 21:02 UTC (permalink / raw)
  To: gdb-patches; +Cc: Brad Mouring

Substitute source path functionality never worked on non-Windows
platforms due to straight strcmp tests returning non-zeros.

Signed-off-by: Brad Mouring <brad.mouring@ni.com>
---
 gdb/source.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/source.c b/gdb/source.c
index c77a4f4..7b59d77 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -946,7 +946,7 @@ substitute_path_rule_matches (const struct substitute_path_rule *rule,
   strncpy (path_start, path, from_len);
   path_start[from_len] = '\0';
 
-  if (FILENAME_CMP (path_start, rule->from) != 0)
+  if (filename_ncmp (path_start, rule->from, from_len) != 0)
     return 0;
 
   /* Make sure that the region in the path that matches the substitution
@@ -1897,7 +1897,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 || filename_ncmp (rule->from, from, strlen(rule->from)) == 0)
         printf_filtered ("  `%s' -> `%s'.\n", rule->from, rule->to);
       rule = rule->next;
     }
-- 
1.8.3-rc3


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-06-03 14:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-23 21:02 [PATCH] gdb/source.c: Fix source path substitution Brad Mouring
2014-05-23 23:50 ` Joel Brobecker
2014-05-24  0:00   ` Joel Brobecker
2014-05-27 13:17     ` Brad Mouring
2014-05-27 18:10       ` Joel Brobecker
2014-05-28 16:01         ` Brad Mouring
2014-05-28 16:15           ` Joel Brobecker
2014-05-28 22:42             ` Fix matching path substitution rule listing, add tests Brad Mouring
2014-05-28 22:42               ` [PATCH 1/2] testsuite/subst: Add tests for printing matches Brad Mouring
2014-05-28 22:42               ` [PATCH 2/2] gdb/source.c: Fix matching path substitute rule listing Brad Mouring
2014-06-02 15:14                 ` Joel Brobecker
2014-06-02 18:28                   ` [PATCH] " Brad Mouring
2014-06-02 20:27                     ` Brad Mouring
2014-06-02 20:45                       ` Joel Brobecker
2014-06-02 20:55                         ` Brad Mouring
2014-06-03 14:25                           ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox