[PATCH 2/2] [GDB] Add trailing dash on triplet regexp
Sergio Durigan Junior
sergiodj@redhat.com
Wed Aug 23 04:18:00 GMT 2017
This is the GDB patch.
It is very simple, and just a necessary adjustment needed because of the
modifications made in the "make_regexp" functions on libcc1.
Now, GDB will provide a full regexp for triplet names, including the
trailing dash ("-"). Therefore, we will have a regexp that truly
matches the full triplet (e.g., "^(x86_64|i.86)(-[^-]*)?-linux(-gnu)?-")
instead of one that leaves the trailing "-" match to libcc1.
OK to apply?
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
gdb/ChangeLog:
2017-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
* compile/compile.c (compile_to_object): Add trailing dash on
triplet regexp.
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 91e084f89f..0ce77a8b95 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -509,7 +509,7 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
arch_rx = gdbarch_gnu_triplet_regexp (gdbarch);
/* Allow triplets with or without vendor set. */
- triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, (char *) NULL);
+ triplet_rx = concat (arch_rx, "(-[^-]*)?-", os_rx, "-", (char *) NULL);
make_cleanup (xfree, triplet_rx);
/* Set compiler command-line arguments. */
More information about the Gdb-patches
mailing list