Skip to content
Snippets Groups Projects
Commit 648dc931 authored by Pratik Patel's avatar Pratik Patel
Browse files

linux-ramdump-parser-v2: fix tmc-etr sg parsing for blk == rwpval

Address the corner case where we end up in a continuous (almost
inifinite) loop when blk value equals rwpval. Change the
condition from blk < rwpval to blk <= rwpval to fix this.

Change-Id: I67923f3fa681e64eaff1821be7ae9805f66d47df
parent 657bb5cd
No related branches found
No related tags found
No related merge requests found
...@@ -305,7 +305,7 @@ class QDSSDump(): ...@@ -305,7 +305,7 @@ class QDSSDump():
start = blk start = blk
continue continue
elif (entry & 0x2) == 2: elif (entry & 0x2) == 2:
if blk < rwpval and rwpval < (blk + 4096): if blk <= rwpval and rwpval < (blk + 4096):
if not bottom_delta_read: if not bottom_delta_read:
it = range(rwpval, blk + 4096) it = range(rwpval, blk + 4096)
bottom_delta_read = True bottom_delta_read = True
...@@ -319,7 +319,7 @@ class QDSSDump(): ...@@ -319,7 +319,7 @@ class QDSSDump():
continue continue
start += 4 start += 4
elif (entry & 0x1) == 1: elif (entry & 0x1) == 1:
if blk < rwpval and rwpval < (blk + 4096): if blk <= rwpval and rwpval < (blk + 4096):
if not bottom_delta_read: if not bottom_delta_read:
it = range(rwpval, blk + 4096) it = range(rwpval, blk + 4096)
bottom_delta_read = True bottom_delta_read = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment