From: Hannes Domani Date: Wed, 13 May 2020 10:38:54 +0000 (+0200) Subject: Handle Windows drives in rbreak paths X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c074f49026acbe0597e0d2d2f7385195dcac565;p=binutils-gdb.git 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 * symtab.c (rbreak_command): Ignore Windows drive colon. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3be14fdc30a..133f97103a1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-06-14 Hannes Domani + + * symtab.c (rbreak_command): Ignore Windows drive colon. + 2020-06-12 Simon Marchi * NEWS: Mention removed GDBserver host support. diff --git a/gdb/symtab.c b/gdb/symtab.c index 791ce11a737..b255cc72327 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;