This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11281] Negative -D value triggers ERROR: Safety pattern mismatch for -D parameter
- From: "mjw at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 14 Feb 2010 20:45:44 -0000
- Subject: [Bug translator/11281] Negative -D value triggers ERROR: Safety pattern mismatch for -D parameter
- References: <20100214203953.11281.mjw@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From mjw at redhat dot com 2010-02-14 20:45 -------
The following fixes it for me. Is this correct?
commit c8408b459b88a5aa5f4325e690aef95b5da7c2eb
Author: Mark Wielaard <mjw@redhat.com>
Date: Sun Feb 14 21:42:06 2010 +0100
PR11281 Allow negative values for -D argument.
Change regexp match to "^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$".
* main.cxx (main): case 'D' allow optional single minus sign after equal
in assert_regexp_match().
diff --git a/main.cxx b/main.cxx
index b5fdbc0..faac7f8 100644
--- a/main.cxx
+++ b/main.cxx
@@ -821,7 +821,7 @@ main (int argc, char * const argv [])
break;
case 'D':
- assert_regexp_match ("-D parameter", optarg,
"^[a-z_][a-z_0-9]*(=[a-z_0-9]+)?$");
+ assert_regexp_match ("-D parameter", optarg,
"^[a-z_][a-z_0-9]*(=-?[a-z_0-9]+)?$");
if (client_options)
client_options_disallowed += client_options_disallowed.empty () ?
"-D" : ", -D";
s.macros.push_back (string (optarg));
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11281
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.