llvm-project/lldb/source/Plugins
Todd Fiala 4507f06aaa Fix linux x86 debugging on a linux x86 host (32-bit on 32-bit).
This change fixes up issues with specifying the size of the i386
register infos for FPU registers.  The bug was that for the i386
register context, the size of the FPU registers were still being
computed based on the x86_64 FXSAVE structure.

This change permits the FPR_SIZE macro to optionally be defined
outside of RegisterInfos_i386.h, which RegisterContextLinux_i386.cpp
does properly. It redefines the FPR_i386 structure with all the
accessible parts that RegisterInfos_i386.h wants to see, which we had
not done before when we made the overall size of the structure
properly sized a recently.

This change also modifies POSIXThread to create a
RegisterContextLinux_i386 only when the host is 32-bit; otherwise, it
uses the RegisterContextLinux_x86_64, which works properly for 32-bit
and 64-bit inferiors on a 64-bit host.

I tested this debugging a Linux x86 exe on an x86 host (Ubuntu 13.10
x86), and debugging a Linux x86 exe and a Linux x86-64 exe on an
x86-64 host (Ubuntu 12.04 LTS).  Those cases all worked.

Thanks to Matthew Gardiner who discoverd may key insights into
tracking down the issue. The motivation for this change and some of
the code originates from him via this thread:

http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140224/010554.html

llvm-svn: 202428
2014-02-27 20:46:12 +00:00
..
ABI Re-apply r201292. We're not going to enforce proper stack frame alignment on i386/x86_64 2014-02-19 03:42:19 +00:00
Disassembler Stop leaking MCRegisterInfo. 2013-12-29 20:17:26 +00:00
DynamicLoader Fix minor build warning on Mac OS X x86_64. 2014-02-14 05:16:17 +00:00
Instruction Update the checks in EmulateInstructionARM::GetFramePointerRegisterNumber 2014-01-06 23:39:35 +00:00
LanguageRuntime Fix build break due to signature change on ASTContext' setExternalSource parameter. 2014-02-27 17:18:23 +00:00
ObjectContainer Fix the format warnings. 2013-10-31 23:55:19 +00:00
ObjectFile remove dead code + simplify a little 2014-02-21 18:08:09 +00:00
OperatingSystem Fixed deadlocks that could occur when using python for breakpoints, operating system plugins, and other async python usage. 2014-02-13 23:34:38 +00:00
Platform Remove an assertion that was being hit due to slow DNS name lookups on MacOSX for "localhost". 2014-02-27 19:38:18 +00:00
Process Fix linux x86 debugging on a linux x86 host (32-bit on 32-bit). 2014-02-27 20:46:12 +00:00
SymbolFile Fix build break due to signature change on ASTContext' setExternalSource parameter. 2014-02-27 17:18:23 +00:00
SymbolVendor Remove commented includes 2014-02-02 14:06:07 +00:00
SystemRuntime Small fix for i386 extended backtraces; wasn't skipping a 2014-02-26 22:27:09 +00:00
UnwindAssembly Convert to UNIX line endings. 2013-09-25 10:37:32 +00:00
CMakeLists.txt Tell CMake about the SystemRuntime plugin. 2013-12-06 09:32:46 +00:00
Makefile Make lldb build with Makefiles on OS X. 2014-01-18 08:05:32 +00:00