[Lldb-commits] [PATCH] D17465: Get register context for the 32-bit process in a WoW64 process minidump.

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 22 11:10:54 PST 2016


amccarth marked an inline comment as done.
amccarth added a comment.

In http://reviews.llvm.org/D17465#357569, @zturner wrote:

> I'll have to look at this more carefully next week.


Take your time, I'm still working on adding some tests for this.

>   I'm guessing the same logic can eventually be re-used to live debug a 32-bit process from a 64-bit LLDB?  (Not that you have to address that now, just curious)


I think most of this patch is specific to minidump debugging.  With a live process, you can get the 32-bit context through API calls like Wow64GetThreadContext function, which hopefully is less prone to breakage in future versions of Windows.  That does mean, however, that we'll have to treat 32-bit on Wow64 as a distinct case from 32-bit on 32-bit and 64-bit on 64-bit.


================
Comment at: source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp:236-237
@@ +235,4 @@
+                    {
+                        // Slot 1 of the thread-local storage in the 64-bit TEB points to a structure
+                        // that includes the 32-bit CONTEXT (after a ULONG).
+                        const size_t addr = wow64teb.TlsSlots[1];
----------------
zturner wrote:
> Are the other fields of this structure known what they mean?
Nope.

The fact that TLS slot 1 points to a structure that contains the context is documented (with the caveat that it may change in future versions of Windows) here:  https://msdn.microsoft.com/en-us/library/ms681670.aspx  

But there's not much other information.

I've updated the comment with that MSDN link.


http://reviews.llvm.org/D17465





More information about the lldb-commits mailing list