]> sourceware.org Git - systemtap.git/commitdiff
PR13313 cont'd, fix regexp for [+-]D[+-]D[+-]D(...) operand case again.
authorMark Wielaard <mjw@redhat.com>
Tue, 15 Nov 2011 10:09:38 +0000 (11:09 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 15 Nov 2011 10:09:38 +0000 (11:09 +0100)
The +/- before the second and third D aren't optional, but the combination
of [+-]D as a whole is optional. Tweak regexp again.

tapsets.cxx

index e76d5d48f0b0cdfef0b08b969f3282fa628d8af5..1534822e506ee644b7f3605f93f7ceefce484b50 100644 (file)
@@ -5395,7 +5395,7 @@ sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg (target_symbol *e)
       // test for OFFSET(REGISTER) where OFFSET is +-N+-N+-N
       // NB: Despite PR11821, we can use regnames here, since the parentheses
       // make things unambiguous. (Note: gdb/stap-probe.c also parses this)
-      rc = regexp_match (asmarg, string("^([+-]?[0-9]*)([+-][0-9]*)([+-][0-9]*)[(](")+regnames+string(")[)]$"), matches);
+      rc = regexp_match (asmarg, string("^([+-]?[0-9]*)([+-][0-9]*)?([+-][0-9]*)?[(](")+regnames+string(")[)]$"), matches);
       if (! rc)
         {
           string regname;
@@ -5466,7 +5466,7 @@ sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg (target_symbol *e)
       // test for OFFSET(BASE_REGISTER,INDEX_REGISTER[,SCALE]) where OFFSET is +-N+-N+-N
       // NB: Despite PR11821, we can use regnames here, since the parentheses
       // make things unambiguous. (Note: gdb/stap-probe.c also parses this)
-      rc = regexp_match (asmarg, string("^([+-]?[0-9]*)([+-][0-9]*)([+-][0-9]*)[(](")+regnames+string("),(")+regnames+string(")(,[1248])?[)]$"), matches);
+      rc = regexp_match (asmarg, string("^([+-]?[0-9]*)([+-][0-9]*)?([+-][0-9]*)?[(](")+regnames+string("),(")+regnames+string(")(,[1248])?[)]$"), matches);
       if (! rc)
         {
           string baseregname;
This page took 0.033034 seconds and 5 git commands to generate.