From 9ed9140d43ab99136134b8b073a95c2cd45ed6ec Mon Sep 17 00:00:00 2001
From: Monu Surana <msurana@codeaurora.org>
Date: Thu, 22 Jan 2015 17:41:06 -0800
Subject: [PATCH] linux-ramdump-parser-v2: Handling error conditions in RTB
 logs

Handling few more error conditions while printing physical
addresses in RTB logs

Change-Id: Idfb75f4ed048d22dd3d8a6c69cd1e9187c9c94c2
---
 linux-ramdump-parser-v2/parsers/rtb.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/linux-ramdump-parser-v2/parsers/rtb.py b/linux-ramdump-parser-v2/parsers/rtb.py
index f1e0814..9a0c99d 100755
--- a/linux-ramdump-parser-v2/parsers/rtb.py
+++ b/linux-ramdump-parser-v2/parsers/rtb.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
+# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 and
@@ -68,7 +68,11 @@ class RTB(RamParser):
 
     def print_readlwritel(self, rtbout, rtb_ptr, logtype):
         data = self.ramdump.read_structure_field(rtb_ptr, 'struct msm_rtb_layout', 'data')
-        physical = self.ramdump.virt_to_phys(data)
+        try:
+            physical = self.ramdump.virt_to_phys(data)
+        except:
+            physical = None
+
         if physical is None:
             physical = "no translation found"
         else:
-- 
GitLab