1. lldb/COFF: Create a separate "section" for the file header (details)
  2. [lit] Don't fail when printing test output with special chars (details)
  3. lldb/minidump: Refactor memory region computation code (details)
Commit 73a7a55c0ec976fecadd7a872d24d850f8cd793a by labath
lldb/COFF: Create a separate "section" for the file header
In an attempt to ensure that every part of the module's memory image is
accounted for, D56537 created a special "container section" spanning the
entire image. While that seemed reasonable at the time (and it still
mostly does), it did create a problem of what to put as the "file size"
of the section, because the image is not continuous on disk, as we
generally assume (which is why I put zero there). Additionally, this
arrangement makes it unclear what kind of permissions should be assigned
to that section (which is what my next patch does).
To get around these, this patch partially reverts D56537, and goes back
to top-level sections. Instead, what I do is create a new "section" for
the object file header, which is also being loaded into memory, though
its not considered to be a section in the strictest sense. This makes it
possible to correctly assign file size section, and we can later assign
permissions to it as well.
Reviewers: amccarth, mstorsjo
Subscribers: lldb-commits
Differential Revision:
The file was modifiedlldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
The file was modifiedlldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
The file was removedlldb/test/Shell/ObjectFile/PECOFF/subsections.yaml
The file was addedlldb/test/Shell/ObjectFile/PECOFF/sections.yaml
Commit 27fdf8a29d1e0740c342d428fa48eda7b088ac8e by dennyje
[lit] Don't fail when printing test output with special chars
This addresses a UnicodeEncodeError when using Python 3.6.5 in Windows
Reviewed By: rnk
Differential Revision:
The file was modifiedllvm/utils/lit/tests/
The file was addedllvm/utils/lit/tests/Inputs/shtest-shell/stdout-encoding.txt
The file was modifiedllvm/utils/lit/lit/
The file was modifiedllvm/utils/lit/tests/
Commit 7c603a41e20f461cf38ec7359a9eaa118fc0db5d by labath
lldb/minidump: Refactor memory region computation code
The goal of this refactor is to enable ProcessMinidump to take into
account the loaded modules and their sections when computing the
permissions of various ranges of memory, as discussed in D66638.
This patch moves some of the responsibility for computing the ranges
from MinidumpParser into ProcessMinidump. MinidumpParser still does the
parsing, but ProcessMinidump becomes responsible for answering the
actual queries about memory ranges. This will enable it (in a follow-up
patch) to augment the information obtained from the parser with data
obtained from actual object files.
The changes in the actual code are fairly straight-forward and just
involve moving code around. MinidumpParser::GetMemoryRegions is renamed
to BuildMemoryRegions to emphasize that it does no caching. The only new
thing is the additional bool flag returned from this function. This
indicates whether the returned regions describe all memory mapped into
the target process. Data obtained from /proc/maps and the MemoryInfoList
stream is considered to be exhaustive. Data obtained from Memory(64)List
is not. This will be used to determine whether we need to augment the
data or not.
This reshuffle means that it is no longer possible/easy to test some of
this code via unit tests, as constructing a ProcessMinidump instance is
hard. Instead, I update the unit tests to only test the parsing of the
actual data, and test the answering of queries through a lit test using
the "memory region" command. The patch also includes some tweaks to the
MemoryRegion class to make the unit tests easier to write.
Reviewers: amccarth, clayborg
Subscribers: lldb-commits
Differential Revision:
The file was modifiedlldb/source/Plugins/Process/minidump/MinidumpParser.h
The file was modifiedlldb/unittests/Process/minidump/MinidumpParserTest.cpp
The file was addedlldb/test/Shell/Minidump/memory-region.yaml
The file was modifiedlldb/source/Plugins/Process/minidump/ProcessMinidump.h
The file was modifiedlldb/include/lldb/Target/MemoryRegionInfo.h
The file was modifiedlldb/source/Plugins/Process/minidump/MinidumpParser.cpp
The file was modifiedlldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
The file was modifiedlldb/source/Target/CMakeLists.txt
The file was addedlldb/source/Target/MemoryRegionInfo.cpp