This is an archive of the discontinued LLVM Phabricator instance.

Refactor Windows process plugin to enable sharing of code between live and post-mortem debugging
ClosedPublic

Authored by amccarth on Oct 27 2015, 5:20 PM.

Details

Reviewers
zturner
Summary

This mostly just moves code around in the tree, breaking the key classes into bases that can be shared between live and mini dump debugging. This will enable the mini dump register contexts to be implemented in terms of common code, which is the next step for getting proper stack traces from mini dumps.

Ran all tests on Windows with no regressions.

Diff Detail

Event Timeline

amccarth updated this revision to Diff 38610.Oct 27 2015, 5:20 PM
amccarth retitled this revision from to Refactor Windows process plugin to enable sharing of code between live and post-mortem debugging.
amccarth updated this object.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.
zturner added inline comments.Oct 28 2015, 9:34 AM
source/Plugins/Process/Windows/Common/ProcessWindowsForward.h
20

Put a newline here

source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
22

I was expecting this to also derive from ProcessWindows, because I thought that was the whole point of moving ProcessWindows to common and then making ProcessWindowsLive inherit from it. Is there goign to be some work on this in a followup patch or did I misunderstand the purpose of raising that up to the common area?

amccarth added inline comments.Oct 28 2015, 10:18 AM
source/Plugins/Process/Windows/Common/ProcessWindowsForward.h
20

Actually, this file is obsolete, so I'm deleting it instead. It was included only from LocalDebugDelegate.cpp, which no longer needs it.

source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
22

Good eye! Fixed.

The intent of this patch was to make it possible to start sharing code between the live and mini dump versions of the RegisterContextWindows classes. (The next patch will actually do that.) The other classes (Process, TargetThread) came along because of tight cooperation among them and the RegisterContext classes. I wasn't really focused on making the mini dump versions deal with those (yet). But this was trivial to fix now.

amccarth updated this revision to Diff 38667.Oct 28 2015, 10:20 AM

Address comments.

zturner accepted this revision.Oct 28 2015, 11:21 AM
zturner edited edge metadata.
This revision is now accepted and ready to land.Oct 28 2015, 11:21 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL251540.

source/Plugins/Process/Windows/Live/x86/RegisterContextWindowsLive_x86.cpp