]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Handle Windows drives in rbreak paths
authorHannes Domani <ssbssa@yahoo.de>
Wed, 13 May 2020 10:38:54 +0000 (12:38 +0200)
committerHannes Domani <ssbssa@yahoo.de>
Sun, 14 Jun 2020 15:38:23 +0000 (17:38 +0200)
Fixes this testsuite fail on Windows:
FAIL: gdb.base/fullpath-expand.exp: rbreak XXX/fullpath-expand-func.c:func

If the found colon is actually part of a Windows drive, look for another.

gdb/ChangeLog:

2020-06-14  Hannes Domani  <ssbssa@yahoo.de>

* symtab.c (rbreak_command): Ignore Windows drive colon.

gdb/ChangeLog
gdb/symtab.c

index 3be14fdc30aa7692008d7bdbe24ad7099a21b89a..133f97103a1ecd8dee06bd6e756006537bbce9c9 100644 (file)
@@ -1,3 +1,7 @@
+2020-06-14  Hannes Domani  <ssbssa@yahoo.de>
+
+       * symtab.c (rbreak_command): Ignore Windows drive colon.
+
 2020-06-12  Simon Marchi  <simon.marchi@efficios.com>
 
        * NEWS: Mention removed GDBserver host support.
index 791ce11a7372c11583eec384b5d44bf13d4366ea..b255cc7232737070b4df14febe9b8cf9b42d58ba 100644 (file)
@@ -5196,6 +5196,11 @@ rbreak_command (const char *regexp, int from_tty)
     {
       const char *colon = strchr (regexp, ':');
 
+      /* Ignore the colon if it is part of a Windows drive.  */
+      if (HAS_DRIVE_SPEC (regexp)
+         && (regexp[2] == '/' || regexp[2] == '\\'))
+       colon = strchr (STRIP_DRIVE_SPEC (regexp), ':');
+
       if (colon && *(colon + 1) != ':')
        {
          int colon_index;