Refactoring for struct UserArea:

- Decouples RegisterContext_x86_64 from UserArea.
- Restores the original definition of UserArea so that it can be used to generate offsets for use with ptrace.
- Moves UserArea to the 64-bit Linux specialization.

- Also fixes an off-by-one error for the size of m_gpr.
- Also adds a TODO comment noting the need for a mechanism to identify the correct plugin based on the target OS (and architecture).

Reviewed by: Matt Kopec and Samuel Jacob

llvm-svn: 181055
This commit is contained in:
Ashok Thirumurthi
2013-05-03 20:00:17 +00:00
parent b9d5d073d6
commit d36712df8d
5 changed files with 117 additions and 115 deletions

View File

@@ -99,6 +99,8 @@ POSIXThread::GetRegisterContext()
break;
case ArchSpec::eCore_x86_64_x86_64:
// TODO: Use target OS/architecture detection rather than ifdefs so that
// lldb built on FreeBSD can debug on Linux and vice-versa.
#ifdef __linux__
m_reg_context_sp.reset(new RegisterContextLinux_x86_64(*this, 0));
#endif