Skip to content
Snippets Groups Projects
Commit 716a2871 authored by Soumen Ghosh's avatar Soumen Ghosh
Browse files

lrdpv2: scandump_reader string matching fail if register valus is 0

	scandumpwrapper dumping the register as 0 instaed of 0x0,
	Due that scandump_reader string matching is failing

Change-Id: I1f86a224fb28a2f946328041472013a294ab1521
parent 76e41afd
No related branches found
No related tags found
No related merge requests found
...@@ -149,16 +149,18 @@ class Scandump_v2(): ...@@ -149,16 +149,18 @@ class Scandump_v2():
alt_pc_1 = None alt_pc_1 = None
alt_pc_2 = None alt_pc_2 = None
pc_val = "" pc_val = ""
match_flag = False
if os.path.exists(output): if os.path.exists(output):
fd = open(output, "r") fd = open(output, "r")
for line in fd: for line in fd:
match_flag = False
matchObj = re.match('^REGISTER.SET ([xse].*[0-9]+)\s(0x[0-9a-f]{0,})', line, re.M | re.I) matchObj = re.match('^REGISTER.SET ([xse].*[0-9]+)\s(0x[0-9a-f]{0,})', line, re.M | re.I)
if matchObj: if matchObj:
regVal = matchObj.group(2) regVal = matchObj.group(2)
if regVal == "0x": if regVal == "0x":
regVal = "0x0000000000000000" regVal = "0x0000000000000000"
self.regs[(matchObj.group(1)).lower()] = int(regVal, 16) self.regs[(matchObj.group(1)).lower()] = int(regVal, 16)
match_flag = True
else: else:
matchObj = re.match('^REGISTER.SET (PC)\s(0x[0-9a-f]{0,})', line, re.M | re.I) matchObj = re.match('^REGISTER.SET (PC)\s(0x[0-9a-f]{0,})', line, re.M | re.I)
if matchObj: if matchObj:
...@@ -177,6 +179,13 @@ class Scandump_v2(): ...@@ -177,6 +179,13 @@ class Scandump_v2():
alt_pc_2 = matchObj_altpc.group(2) alt_pc_2 = matchObj_altpc.group(2)
if alt_pc_2 == "0x": if alt_pc_2 == "0x":
alt_pc_2 = "0x0000000000000000" alt_pc_2 = "0x0000000000000000"
matchObj = re.match('^REGISTER.SET ([xse].*[0-9]+)\s([0-9a-f])', line, re.M | re.I)
if matchObj and match_flag == False:
regVal = matchObj.group(2)
if regVal == "0":
regVal = "0x0000000000000000"
self.regs[(matchObj.group(1)).lower()] = int(regVal, 16)
result_32 = self.alt_pc_selection(pc_val) result_32 = self.alt_pc_selection(pc_val)
if result_32: if result_32:
......
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