diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-05-13 12:38:54 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-06-14 17:38:23 +0200 |
commit | 2c074f49026acbe0597e0d2d2f7385195dcac565 (patch) | |
tree | 9745845e45c8fb388253e5cc605533cb1e6fdcb9 /gdb/symtab.c | |
parent | efe30057d2fcf875e39efbe6cc2a6271decbbd2e (diff) | |
download | gdb-2c074f49026acbe0597e0d2d2f7385195dcac565.zip gdb-2c074f49026acbe0597e0d2d2f7385195dcac565.tar.gz gdb-2c074f49026acbe0597e0d2d2f7385195dcac565.tar.bz2 |
Handle Windows drives in rbreak paths
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.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 791ce11..b255cc7 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -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; |