Skip to contentSkip to conversation

libtracefs: Fix SYM-OFFSET in tracefs_sql()

PATCH New Steven Rostedt 1 participant 1 message Aug 13, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtracefs: Fix SYM-OFFSET in tracefs_sql()

From: "Steven Rostedt (VMware)" <[email protected]>

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.

---
 src/sqlhist.l | 6 ++++++
 1 file changed, 6 insertions(+)
src/sqlhist.l +6 -0
index db0ae11..4df475a 100644
@@ -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);
Signature · 1 line
2.31.1