Skip to content

Commit 25a1104

Browse files
committed
Print a valid offset in the "oops" hexdump
1 parent f58a07f commit 25a1104

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javaobj.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,12 +1031,13 @@ def _oops_dump_state(self, ignore_remaining_data=False):
10311031

10321032
# Do not use a keyword argument
10331033
self.object_stream.seek(-16, os.SEEK_CUR)
1034+
position = self.object_stream.tell()
10341035
the_rest = self.object_stream.read()
10351036

10361037
if not ignore_remaining_data and len(the_rest):
10371038
log_error("Warning!!!!: Stream still has {0} bytes left."
10381039
.format(len(the_rest)))
1039-
log_error(self._create_hexdump(the_rest))
1040+
log_error(self._create_hexdump(the_rest, position))
10401041

10411042
log_error("=" * 30)
10421043

0 commit comments

Comments
 (0)