From a0015301dd3cda044109121743d2aa1fab729ff0 Mon Sep 17 00:00:00 2001 From: Gopi Krishna Nedanuri <gnedanur@codeaurora.org> Date: Mon, 7 May 2018 20:41:05 +0530 Subject: [PATCH] lrdp_v2: Fix timer list for dynamic modules Handle the exception caused in lookup of symbol in dynamic modules. Change-Id: If0fa6a118569da6aa368307e3c27ec4b3c497cd1 --- linux-ramdump-parser-v2/parsers/timerlist.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-ramdump-parser-v2/parsers/timerlist.py b/linux-ramdump-parser-v2/parsers/timerlist.py index 650fea7..187c361 100644 --- a/linux-ramdump-parser-v2/parsers/timerlist.py +++ b/linux-ramdump-parser-v2/parsers/timerlist.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. +# Copyright (c) 2015-2018, 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 @@ -50,8 +50,10 @@ class TimerList(RamParser) : function_addr = node + self.ramdump.field_offset('struct timer_list', 'function') expires_addr = node + self.ramdump.field_offset('struct timer_list', 'expires') data_addr = node + self.ramdump.field_offset('struct timer_list', 'data') - - function = self.ramdump.unwind_lookup(self.ramdump.read_word(function_addr))[0] + try: + function = self.ramdump.unwind_lookup(self.ramdump.read_word(function_addr))[0] + except TypeError: + function = "<dynamic module>" expires = self.ramdump.read_word(expires_addr) try: data = hex(self.ramdump.read_word(data_addr)).rstrip('L') -- GitLab