@@ -77,6 +77,7 @@ export type VerifierLogState = {
7777 cLineIdtoIdx : Map < string , number > ;
7878 bpfStates : BpfState [ ] ;
7979 cSourceMap : CSourceMap ;
80+ lastInsIdx : number ;
8081} ;
8182
8283export function makeValue (
@@ -272,6 +273,7 @@ export function getEmptyVerifierState(): VerifierLogState {
272273 cLineIdtoIdx : new Map ( ) ,
273274 bpfStates : [ ] ,
274275 cSourceMap : new CSourceMap ( ) ,
276+ lastInsIdx : 0 ,
275277 } ;
276278}
277279
@@ -299,6 +301,7 @@ export function processRawLines(rawLines: string[]): VerifierLogState {
299301 let currentCSourceLine : CSourceLine | undefined ;
300302 const cSourceMap = new CSourceMap ( ) ;
301303 const knownMessageIdxs : number [ ] = [ ] ;
304+ let lastInsIdx : number = 0 ;
302305
303306 // First pass: parse individual lines
304307 lines = rawLines . map ( ( rawLine , idx ) => {
@@ -309,6 +312,13 @@ export function processRawLines(rawLines: string[]): VerifierLogState {
309312 return parsedLine ;
310313 } ) ;
311314
315+ for ( let i = lines . length - 1 ; i >= 0 ; -- i ) {
316+ if ( lines [ i ] . type == ParsedLineType . INSTRUCTION ) {
317+ lastInsIdx = lines [ i ] . idx ;
318+ break ;
319+ }
320+ }
321+
312322 // Process known messages and fixup parsed lines
313323 knownMessageIdxs . forEach ( ( idx ) => {
314324 const parsedLine = lines [ idx ] ;
@@ -378,6 +388,7 @@ export function processRawLines(rawLines: string[]): VerifierLogState {
378388 cSourceMap,
379389 cLines,
380390 cLineIdtoIdx,
391+ lastInsIdx,
381392 } ;
382393}
383394
0 commit comments