[Lldb-commits] [PATCH] D60121: Object/Minidump: Add support for reading the ModuleList stream

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 2 05:14:32 PDT 2019


labath created this revision.
labath added reviewers: zturner, amccarth, jhenderson, clayborg.
Herald added a subscriber: jdoerfert.
Herald added a project: LLVM.

The ModuleList stream consists of an integer giving the number of
entries in the list, followed by the list itself. Each entry in the list
describes a module (dynamically loaded objects which were loaded in the
process when it crashed (or when the minidump was generated).

The code for reading the list is relatively straight-forward, with a
single gotcha. Some minidump writers are emitting padding after the
"count" field in order to align the subsequent list on 8 byte boundary
(this depends on how their ModuleList type was defined and the native
alignment of various types on their platform). Fortunately, the minidump
format contains enough redundancy (in the form of the stream length
field in the stream directory), which allows us to detect this situation
and correct it.

This patch just adds the ability to parse the stream. Code for
conversion to/from yaml will come in a follow-up patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D60121

Files:
  include/llvm/BinaryFormat/Minidump.h
  include/llvm/Object/Minidump.h
  lib/Object/Minidump.cpp
  unittests/Object/MinidumpTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60121.193257.patch
Type: text/x-patch
Size: 8953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190402/906228c0/attachment-0001.bin>


More information about the lldb-commits mailing list