Hi Alex,
When I searched struct journal_head by readStructNext(), the
number of journal_head was over _MAXEL (== 10000) and the
searching was stopped.
It is good to add a parameter to change the limit.
Signed-off-by: Masayoshi Mizuma <m.mizuma(a)jp.fujitsu.com>
---
pykdump/wrapcrash.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pykdump/wrapcrash.py b/pykdump/wrapcrash.py
index 74d805e..6c83e67 100755
--- a/pykdump/wrapcrash.py
+++ b/pykdump/wrapcrash.py
@@ -1202,7 +1202,7 @@ def readSUListFromHead(headaddr, listfieldname, mystruct,
maxel=_MAXEL,
# an embedded listhead. 'shead' is either a structure or tPtr pointer
# to structure
-def readStructNext(shead, nextname, inchead = True):
+def readStructNext(shead, nextname, maxel=_MAXEL, inchead = True):
if (not isinstance(shead, StructResult)):
# This should be tPtr
if (shead == 0):
@@ -1211,7 +1211,7 @@ def readStructNext(shead, nextname, inchead = True):
stype = shead.PYT_symbol
offset = shead.PYT_sinfo[nextname].offset
out = []
- for p in readList(Addr(shead), offset, inchead=inchead):
+ for p in readList(Addr(shead), offset, maxel, inchead=inchead):
out.append(readSU(stype, p))
return out
--
1.7.1