Commit b4b8d923 authored by Peter Sanford's avatar Peter Sanford

Allow quoted string attach points

Allow quoted string attach points so that you can match more than
[a-Z0-9].

This specific issue that this fixes is attaching to go
functions. These symbols are in the format '<package>.<function>' and
can contain unicode letters and digits.
parent 2a906ebc
......@@ -142,6 +142,7 @@ attach_points : attach_points "," attach_point { $$ = $1; $1->push_back($3); }
attach_point : ident { $$ = new ast::AttachPoint($1); }
| ident ":" wildcard { $$ = new ast::AttachPoint($1, $3); }
| ident PATH STRING { $$ = new ast::AttachPoint($1, $2.substr(1, $2.size()-2), $3); }
| ident PATH wildcard { $$ = new ast::AttachPoint($1, $2.substr(1, $2.size()-2), $3); }
| ident PATH INT { $$ = new ast::AttachPoint($1, $2.substr(1, $2.size()-2), $3); }
;
......
......@@ -457,6 +457,10 @@ TEST(Parser, uprobe)
"Program\n"
" uprobe:/my/program:func\n"
" int: 1\n");
test("uprobe:/my/go/program:\"pkg.func\u2C51\" { 1; }",
"Program\n"
" uprobe:/my/go/program:pkg.func\u2C51\n"
" int: 1\n");
}
TEST(Parser, usdt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment