diff mbox series

libtracefs: Fix SYM-OFFSET in tracefs_sql()

Message ID 20210812213853.77183026@oasis.local.home (mailing list archive)
State Accepted
Commit eaacd582e528cde37d781c6d47e8c15a4bc4e97d
Headers show
Series libtracefs: Fix SYM-OFFSET in tracefs_sql() | expand

Commit Message

Steven Rostedt Aug. 13, 2021, 1:38 a.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The lexical for SYM-OFFSET would break it up into SYM '-' OFFSET and that
would not be parsed properly.

Let the "SYM-OFFSET' be its own lexical operator, to fix it.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 src/sqlhist.l | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/src/sqlhist.l b/src/sqlhist.l
index db0ae11..4df475a 100644
--- a/src/sqlhist.l
+++ b/src/sqlhist.l
@@ -40,6 +40,12 @@  on { HANDLE_COLUMN; return ON; }
 where { HANDLE_COLUMN; return WHERE; }
 cast { HANDLE_COLUMN; return CAST; }
 
+sym-offset {
+	HANDLE_COLUMN;
+	yylval->string = store_str(TRACE_SB, yyg->yytext_r);
+	return FIELD;
+}
+
 {qstring} {
 	HANDLE_COLUMN;
 	yylval->string = store_str(TRACE_SB, yyg->yytext_r);