From ed1ce8adea6a0d02de01ba48f8037cf5f75f16c4 Mon Sep 17 00:00:00 2001
From: Pratik Patel <pratikp@codeaurora.org>
Date: Thu, 12 Jun 2014 18:36:54 -0700
Subject: [PATCH] linux-ramdump-parser-v2: don't print regs for
 check-for-watchdog

No need to print regs for --check-for-watchdog since they are
getting printed via --parse-debug-image after checking proper
magic values. Also skip printing whether wdog occurred for
targets that use newer memory dump table format since it will be
covered by the per cpu status field.

Change-Id: I9489006e467ccdb452251abd6f084d05b54ef500
---
 linux-ramdump-parser-v2/parsers/watchdog.py | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)
 mode change 100644 => 100755 linux-ramdump-parser-v2/parsers/watchdog.py

diff --git a/linux-ramdump-parser-v2/parsers/watchdog.py b/linux-ramdump-parser-v2/parsers/watchdog.py
old mode 100644
new mode 100755
index 33ca886..8aabef8
--- a/linux-ramdump-parser-v2/parsers/watchdog.py
+++ b/linux-ramdump-parser-v2/parsers/watchdog.py
@@ -306,6 +306,9 @@ class TZRegDump(RamParser):
         return True
 
     def parse(self):
+        if self.ramdump.addr_lookup('memdump'):
+            return None
+
         ebi_addr = self.ramdump.read_tz_offset()
 
         if ebi_addr is None:
@@ -323,22 +326,6 @@ class TZRegDump(RamParser):
             '[!!!!] Read {0:x} from IMEM successfully!'.format(ebi_addr))
         print_out_str('[!!!!] An FIQ occured on the system!')
 
-        # The debug image will be responsible for printing out the register
-        # information, no need to print it twice
-        if self.ramdump.is_config_defined('CONFIG_MSM_DEBUG_IMAGE'):
-            print_out_str(
-                '[!!!!] Debug image was enabled, the contexts will be printed there')
-            return
-
-        regs = self.init_regs(ebi_addr)
-        if regs is False:
-            print_out_str('!!! Could not get registers from TZ dump')
-            return
-
-        for i in range(self.ncores):
-            self.dump_core_pc(i)
-        self.dump_all_regs()
-
 
 def get_wdog_timing(ramdump):
     jiffies_addr = ramdump.addr_lookup('jiffies')
-- 
GitLab