[Lldb-commits] [lldb] r218568 - Enable llgs to build against experimental Android AOSP lldb/llvm/clang/compiler-rt repos.
Todd Fiala
todd.fiala at gmail.com
Sat Sep 27 09:54:24 PDT 2014
Author: tfiala
Date: Sat Sep 27 11:54:22 2014
New Revision: 218568
URL: http://llvm.org/viewvc/llvm-project?rev=218568&view=rev
Log:
Enable llgs to build against experimental Android AOSP lldb/llvm/clang/compiler-rt repos.
See http://reviews.llvm.org/D5495 for more details.
These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk
build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in
github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}.
Modified:
lldb/trunk/include/lldb/Core/IOHandler.h
lldb/trunk/include/lldb/Host/linux/Config.h
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Host/common/Host.cpp
lldb/trunk/source/Host/common/Socket.cpp
lldb/trunk/source/Host/linux/Host.cpp
lldb/trunk/source/Host/posix/HostInfoPosix.cpp
lldb/trunk/source/Host/posix/HostThreadPosix.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Plugins/Process/Linux/LinuxThread.h
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp
lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm64.h
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Target/ProcessLaunchInfo.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/tools/lldb-gdbserver/lldb-gdbserver.cpp
Modified: lldb/trunk/include/lldb/Core/IOHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/IOHandler.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/IOHandler.h (original)
+++ lldb/trunk/include/lldb/Core/IOHandler.h Sat Sep 27 11:54:22 2014
@@ -457,6 +457,7 @@ namespace lldb_private {
SetBaseLineNumber (uint32_t line);
private:
+#ifndef LLDB_DISABLE_LIBEDIT
static LineStatus
LineCompletedCallback (Editline *editline,
StringList &lines,
@@ -471,9 +472,12 @@ namespace lldb_private {
int max_matches,
StringList &matches,
void *baton);
+#endif
protected:
+#ifndef LLDB_DISABLE_LIBEDIT
std::unique_ptr<Editline> m_editline_ap;
+#endif
IOHandlerDelegate &m_delegate;
std::string m_prompt;
uint32_t m_base_line_number; // If non-zero, then show line numbers in prompt
Modified: lldb/trunk/include/lldb/Host/linux/Config.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/linux/Config.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/linux/Config.h (original)
+++ lldb/trunk/include/lldb/Host/linux/Config.h Sat Sep 27 11:54:22 2014
@@ -19,7 +19,9 @@
#define LLDB_CONFIG_TERMIOS_SUPPORTED 1
+#ifndef __ANDROID__
#define LLDB_CONFIG_TILDE_RESOLVES_TO_USER 1
+#endif
//#define LLDB_CONFIG_DLOPEN_RTLD_FIRST_SUPPORTED 1
Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Sat Sep 27 11:54:22 2014
@@ -19,7 +19,9 @@
#include "lldb/Core/State.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/ValueObjectRegister.h"
+#ifndef LLDB_DISABLE_LIBEDIT
#include "lldb/Host/Editline.h"
+#endif
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Symbol/Block.h"
@@ -339,7 +341,9 @@ IOHandlerEditline::IOHandlerEditline (De
uint32_t line_number_start,
IOHandlerDelegate &delegate) :
IOHandler (debugger, input_sp, output_sp, error_sp, flags),
+#ifndef LLDB_DISABLE_LIBEDIT
m_editline_ap (),
+#endif
m_delegate (delegate),
m_prompt (),
m_base_line_number (line_number_start),
@@ -347,6 +351,7 @@ IOHandlerEditline::IOHandlerEditline (De
{
SetPrompt(prompt);
+#ifndef LLDB_DISABLE_LIBEDIT
bool use_editline = false;
#ifndef _MSC_VER
@@ -369,24 +374,28 @@ IOHandlerEditline::IOHandlerEditline (De
m_editline_ap->SetLineCompleteCallback (LineCompletedCallback, this);
m_editline_ap->SetAutoCompleteCallback (AutoCompleteCallback, this);
}
-
+#endif
}
IOHandlerEditline::~IOHandlerEditline ()
{
+#ifndef LLDB_DISABLE_LIBEDIT
m_editline_ap.reset();
+#endif
}
bool
IOHandlerEditline::GetLine (std::string &line, bool &interrupted)
{
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
{
return m_editline_ap->GetLine(line, interrupted).Success();
}
else
{
+#endif
line.clear();
FILE *in = GetInputFILE();
@@ -452,10 +461,13 @@ IOHandlerEditline::GetLine (std::string
SetIsDone(true);
}
return false;
+#ifndef LLDB_DISABLE_LIBEDIT
}
+#endif
}
+#ifndef LLDB_DISABLE_LIBEDIT
LineStatus
IOHandlerEditline::LineCompletedCallback (Editline *editline,
StringList &lines,
@@ -487,14 +499,24 @@ IOHandlerEditline::AutoCompleteCallback
matches);
return 0;
}
+#endif
const char *
IOHandlerEditline::GetPrompt ()
{
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
+ {
return m_editline_ap->GetPrompt ();
- else if (m_prompt.empty())
- return NULL;
+ }
+ else
+ {
+#endif
+ if (m_prompt.empty())
+ return NULL;
+#ifndef LLDB_DISABLE_LIBEDIT
+ }
+#endif
return m_prompt.c_str();
}
@@ -505,8 +527,10 @@ IOHandlerEditline::SetPrompt (const char
m_prompt = p;
else
m_prompt.clear();
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
m_editline_ap->SetPrompt (m_prompt.empty() ? NULL : m_prompt.c_str());
+#endif
return true;
}
@@ -514,14 +538,17 @@ void
IOHandlerEditline::SetBaseLineNumber (uint32_t line)
{
m_base_line_number = line;
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
m_editline_ap->ShowLineNumbers (true, line);
+#endif
}
bool
IOHandlerEditline::GetLines (StringList &lines, bool &interrupted)
{
bool success = false;
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
{
std::string end_token;
@@ -529,6 +556,7 @@ IOHandlerEditline::GetLines (StringList
}
else
{
+#endif
LineStatus lines_status = LineStatus::Success;
Error error;
@@ -567,7 +595,9 @@ IOHandlerEditline::GetLines (StringList
m_delegate.IOHandlerLinesUpdated(*this, lines, UINT32_MAX, error);
success = lines.GetSize() > 0;
+#ifndef LLDB_DISABLE_LIBEDIT
}
+#endif
return success;
}
@@ -619,20 +649,24 @@ IOHandlerEditline::Run ()
void
IOHandlerEditline::Hide ()
{
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
m_editline_ap->Hide();
+#endif
}
void
IOHandlerEditline::Refresh ()
{
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
{
m_editline_ap->Refresh();
}
else
{
+#endif
const char *prompt = GetPrompt();
if (prompt && prompt[0])
{
@@ -643,14 +677,18 @@ IOHandlerEditline::Refresh ()
::fflush(out);
}
}
+#ifndef LLDB_DISABLE_LIBEDIT
}
+#endif
}
void
IOHandlerEditline::Cancel ()
{
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
m_editline_ap->Interrupt ();
+#endif
}
bool
@@ -660,16 +698,20 @@ IOHandlerEditline::Interrupt ()
if (m_delegate.IOHandlerInterrupt(*this))
return true;
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
return m_editline_ap->Interrupt();
+#endif
return false;
}
void
IOHandlerEditline::GotEOF()
{
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
m_editline_ap->Interrupt();
+#endif
}
// we may want curses to be disabled for some builds
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Sat Sep 27 11:54:22 2014
@@ -27,8 +27,8 @@
#include <sys/stat.h>
#endif
-#if !defined (__GNU__) && !defined (_WIN32)
-// Does not exist under GNU/HURD or Windows
+#if !defined (__GNU__) && !defined (_WIN32) && !defined (__ANDROID__)
+// Does not exist under GNU/HURD, or Windows, or Android
#include <sys/sysctl.h>
#endif
@@ -39,7 +39,9 @@
#endif
#if defined (__linux__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__NetBSD__)
+#ifndef __ANDROID__
#include <spawn.h>
+#endif
#include <sys/wait.h>
#include <sys/syscall.h>
#endif
@@ -127,6 +129,7 @@ Host::StartMonitoringChildProcess(Host::
return ThreadLauncher::LaunchThread(thread_name, MonitorChildProcessThreadFunction, info_ptr, NULL);
}
+#ifndef __ANDROID__
//------------------------------------------------------------------
// Scoped class that will disable thread canceling when it is
// constructed, and exception safely restore the previous value it
@@ -154,6 +157,7 @@ public:
private:
int m_old_state; // Save the old cancelability state.
};
+#endif
static thread_result_t
MonitorChildProcessThreadFunction (void *arg)
@@ -187,10 +191,14 @@ MonitorChildProcessThreadFunction (void
log->Printf("%s ::wait_pid (pid = %" PRIi32 ", &status, options = %i)...", function, pid, options);
// Wait for all child processes
+#ifndef __ANDROID__
::pthread_testcancel ();
+#endif
// Get signals from all children with same process group of pid
const ::pid_t wait_pid = ::waitpid (pid, &status, options);
+#ifndef __ANDROID__
::pthread_testcancel ();
+#endif
if (wait_pid == -1)
{
@@ -236,7 +244,9 @@ MonitorChildProcessThreadFunction (void
// Scope for pthread_cancel_disabler
{
+#ifndef __ANDROID__
ScopedPThreadCancelDisabler pthread_cancel_disabler;
+#endif
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
if (log)
@@ -464,12 +474,16 @@ FileSpec
Host::GetModuleFileSpecForHostAddress (const void *host_addr)
{
FileSpec module_filespec;
+#ifndef __ANDROID__
Dl_info info;
if (::dladdr (host_addr, &info))
{
if (info.dli_fname)
module_filespec.SetFile(info.dli_fname, true);
}
+#else
+ assert(false && "dladdr() not supported on Android");
+#endif
return module_filespec;
}
@@ -705,6 +719,7 @@ Host::RunShellCommand (const char *comma
short
Host::GetPosixspawnFlags (ProcessLaunchInfo &launch_info)
{
+#ifndef __ANDROID__
short flags = POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK;
#if defined (__APPLE__)
@@ -747,12 +762,17 @@ Host::GetPosixspawnFlags (ProcessLaunchI
#endif
#endif // #if defined (__APPLE__)
return flags;
+#else
+ assert(false *&& "Host::GetPosixspawnFlags() not supported on Android");
+ return 0;
+#endif
}
Error
Host::LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, ::pid_t &pid)
{
Error error;
+#ifndef __ANDROID__
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_HOST | LIBLLDB_LOG_PROCESS));
posix_spawnattr_t attr;
@@ -955,6 +975,9 @@ Host::LaunchProcessPosixSpawn (const cha
}
#endif
}
+#else
+ error.SetErrorString("Host::LaunchProcessPosixSpawn() not supported on Android");
+#endif
return error;
}
@@ -962,6 +985,7 @@ Host::LaunchProcessPosixSpawn (const cha
bool
Host::AddPosixSpawnFileAction(void *_file_actions, const FileAction *info, Log *log, Error &error)
{
+#ifndef __ANDROID__
if (info == NULL)
return false;
@@ -1024,6 +1048,10 @@ Host::AddPosixSpawnFileAction(void *_fil
break;
}
return error.Success();
+#else
+ error.SetErrorString("Host::AddPosixSpawnFileAction() not supported on Android");
+ return false;
+#endif
}
#endif // LaunchProcedssPosixSpawn: Apple, Linux, FreeBSD and other GLIBC systems
Modified: lldb/trunk/source/Host/common/Socket.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Socket.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Socket.cpp (original)
+++ lldb/trunk/source/Host/common/Socket.cpp Sat Sep 27 11:54:22 2014
@@ -40,6 +40,13 @@ typedef void * get_socket_option_arg_typ
const NativeSocket Socket::kInvalidSocketValue = -1;
#endif // #if defined(_WIN32)
+#ifdef __ANDROID__
+// Android does not have SUN_LEN
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen((ptr)->sun_path))
+#endif
+#endif // #ifdef __ANDROID__
+
Socket::Socket(NativeSocket socket, SocketProtocol protocol, bool should_close)
: IOObject(eFDTypeSocket, should_close)
, m_protocol(protocol)
Modified: lldb/trunk/source/Host/linux/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/Host.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Host/linux/Host.cpp (original)
+++ lldb/trunk/source/Host/linux/Host.cpp Sat Sep 27 11:54:22 2014
@@ -14,7 +14,9 @@
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
+#ifndef __ANDROID__
#include <execinfo.h>
+#endif
// C++ Includes
// Other libraries and framework includes
@@ -375,6 +377,7 @@ Host::GetProcessInfo (lldb::pid_t pid, P
void
Host::Backtrace (Stream &strm, uint32_t max_frames)
{
+#ifndef __ANDROID__
if (max_frames > 0)
{
std::vector<void *> frame_buffer (max_frames, NULL);
@@ -388,6 +391,9 @@ Host::Backtrace (Stream &strm, uint32_t
::free (strs);
}
}
+#else
+ assert(false && "::backtrace() not supported on Android");
+#endif
}
size_t
Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Sat Sep 27 11:54:22 2014
@@ -69,6 +69,7 @@ HostInfoPosix::LookupUserName(uint32_t u
const char *
HostInfoPosix::LookupGroupName(uint32_t gid, std::string &group_name)
{
+#ifndef __ANDROID__
char group_buffer[PATH_MAX];
size_t group_buffer_size = sizeof(group_buffer);
struct group group_info;
@@ -94,6 +95,9 @@ HostInfoPosix::LookupGroupName(uint32_t
}
}
group_name.clear();
+#else
+ assert(false && "getgrgid_r() not supported on Android");
+#endif
return NULL;
}
Modified: lldb/trunk/source/Host/posix/HostThreadPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostThreadPosix.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostThreadPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostThreadPosix.cpp Sat Sep 27 11:54:22 2014
@@ -50,8 +50,12 @@ Error
HostThreadPosix::Cancel()
{
Error error;
+#ifndef __ANDROID__
int err = ::pthread_cancel(m_thread);
error.SetError(err, eErrorTypePOSIX);
+#else
+ error.SetErrorString("HostThreadPosix::Cancel() not supported on Android");
+#endif
return error;
}
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Sat Sep 27 11:54:22 2014
@@ -49,7 +49,9 @@
#include "lldb/Core/StreamFile.h"
#include "lldb/Core/Timer.h"
+#ifndef LLDB_DISABLE_LIBEDIT
#include "lldb/Host/Editline.h"
+#endif
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
Modified: lldb/trunk/source/Plugins/Process/Linux/LinuxThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/LinuxThread.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/LinuxThread.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/LinuxThread.h Sat Sep 27 11:54:22 2014
@@ -11,7 +11,7 @@
#define liblldb_LinuxThread_H_
// Other libraries and framework includes
-#include "POSIXThread.h"
+#include "Plugins/Process/POSIX/POSIXThread.h"
//------------------------------------------------------------------------------
// @class LinuxThread
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Sat Sep 27 11:54:22 2014
@@ -19,7 +19,9 @@
#include <unistd.h>
#include <linux/unistd.h>
#include <sys/personality.h>
+#ifndef __ANDROID__
#include <sys/procfs.h>
+#endif
#include <sys/ptrace.h>
#include <sys/uio.h>
#include <sys/socket.h>
@@ -58,7 +60,12 @@
#include "Plugins/Process/Utility/LinuxSignals.h"
#include "NativeThreadLinux.h"
#include "ProcFileReader.h"
-#include "ProcessPOSIXLog.h"
+#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
+
+#ifdef __ANDROID__
+#define __ptrace_request int
+#define PT_DETACH PTRACE_DETACH
+#endif
#define DEBUG_PTRACE_MAXBYTES 20
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h Sat Sep 27 11:54:22 2014
@@ -12,8 +12,8 @@
#define lldb_NativeRegisterContextLinux_x86_64_h
#include "lldb/Target/NativeRegisterContextRegisterInfo.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
namespace lldb_private
{
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.cpp Sat Sep 27 11:54:22 2014
@@ -20,7 +20,7 @@
#include "lldb/Target/Target.h"
#include "ProcessLinux.h"
-#include "ProcessPOSIXLog.h"
+#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
#include "Plugins/Process/Utility/InferiorCallPOSIX.h"
#include "Plugins/Process/Utility/LinuxSignals.h"
#include "ProcessMonitor.h"
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessLinux.h Sat Sep 27 11:54:22 2014
@@ -17,8 +17,8 @@
// Other libraries and framework includes
#include "lldb/Target/Process.h"
-#include "ProcessMessage.h"
-#include "ProcessPOSIX.h"
+#include "Plugins/Process/POSIX/ProcessMessage.h"
+#include "Plugins/Process/POSIX/ProcessPOSIX.h"
class ProcessMonitor;
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Sat Sep 27 11:54:22 2014
@@ -17,7 +17,9 @@
#include <unistd.h>
#include <elf.h>
#include <sys/personality.h>
+#ifndef __ANDROID__
#include <sys/procfs.h>
+#endif
#include <sys/ptrace.h>
#include <sys/uio.h>
#include <sys/socket.h>
@@ -39,11 +41,16 @@
#include "lldb/Target/RegisterContext.h"
#include "lldb/Utility/PseudoTerminal.h"
-#include "POSIXThread.h"
+#include "Plugins/Process/POSIX/POSIXThread.h"
#include "ProcessLinux.h"
-#include "ProcessPOSIXLog.h"
+#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
#include "ProcessMonitor.h"
+#ifdef __ANDROID__
+#define __ptrace_request int
+#define PT_DETACH PTRACE_DETACH
+#endif
+
#define DEBUG_PTRACE_MAXBYTES 20
// Support ptrace extensions even when compiled without required kernel support
Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.cpp Sat Sep 27 11:54:22 2014
@@ -31,18 +31,17 @@
#include "POSIXThread.h"
#include "ProcessPOSIX.h"
#include "ProcessPOSIXLog.h"
-#include "ProcessMonitor.h"
+#include "Plugins/Process/Linux/ProcessMonitor.h"
#include "RegisterContextPOSIXProcessMonitor_arm64.h"
#include "RegisterContextPOSIXProcessMonitor_mips64.h"
#include "RegisterContextPOSIXProcessMonitor_x86.h"
-#include "RegisterContextLinux_arm64.h"
-#include "RegisterContextLinux_i386.h"
-#include "RegisterContextLinux_x86_64.h"
-#include "RegisterContextFreeBSD_i386.h"
-#include "RegisterContextFreeBSD_mips64.h"
-#include "RegisterContextFreeBSD_x86_64.h"
-
-#include "UnwindLLDB.h"
+#include "Plugins/Process/Utility/RegisterContextLinux_arm64.h"
+#include "Plugins/Process/Utility/RegisterContextLinux_i386.h"
+#include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
+#include "Plugins/Process/Utility/UnwindLLDB.h"
using namespace lldb;
using namespace lldb_private;
Modified: lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/POSIXThread.h Sat Sep 27 11:54:22 2014
@@ -17,7 +17,7 @@
// Other libraries and framework includes
#include "lldb/Target/Thread.h"
-#include "RegisterContextPOSIX.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
class ProcessMessage;
class ProcessMonitor;
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Sat Sep 27 11:54:22 2014
@@ -28,7 +28,7 @@
#include "ProcessPOSIX.h"
#include "ProcessPOSIXLog.h"
#include "Plugins/Process/Utility/InferiorCallPOSIX.h"
-#include "ProcessMonitor.h"
+#include "Plugins/Process/Linux/ProcessMonitor.h"
#include "POSIXThread.h"
using namespace lldb;
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_arm64.cpp Sat Sep 27 11:54:22 2014
@@ -10,10 +10,10 @@
#include "lldb/Target/Thread.h"
#include "lldb/Core/RegisterValue.h"
-#include "RegisterContextPOSIX_arm64.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX_arm64.h"
#include "ProcessPOSIX.h"
#include "RegisterContextPOSIXProcessMonitor_arm64.h"
-#include "ProcessMonitor.h"
+#include "Plugins/Process/Linux/ProcessMonitor.h"
#define REG_CONTEXT_SIZE (GetGPRSize())
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_mips64.cpp Sat Sep 27 11:54:22 2014
@@ -10,10 +10,10 @@
#include "lldb/Target/Thread.h"
#include "lldb/Core/RegisterValue.h"
-#include "RegisterContextPOSIX_mips64.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h"
#include "ProcessPOSIX.h"
#include "RegisterContextPOSIXProcessMonitor_mips64.h"
-#include "ProcessMonitor.h"
+#include "Plugins/Process/Linux/ProcessMonitor.h"
using namespace lldb_private;
using namespace lldb;
Modified: lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp Sat Sep 27 11:54:22 2014
@@ -10,9 +10,9 @@
#include "lldb/Target/Thread.h"
#include "lldb/Core/RegisterValue.h"
-#include "ProcessPOSIX.h"
+#include "Plugins/Process/POSIX/ProcessPOSIX.h"
#include "RegisterContextPOSIXProcessMonitor_x86.h"
-#include "ProcessMonitor.h"
+#include "Plugins/Process/Linux/ProcessMonitor.h"
using namespace lldb_private;
using namespace lldb;
@@ -48,6 +48,7 @@ size_and_rw_bits(size_t size, bool read,
return (0x2 << 2) | rw;
default:
assert(0 && "invalid size, must be one of 1, 2, 4, or 8");
+ return 0; // Unreachable. Just to silence compiler.
}
}
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm64.h?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm64.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfos_arm64.h Sat Sep 27 11:54:22 2014
@@ -15,8 +15,8 @@
#include "lldb/lldb-defines.h"
#include "lldb/lldb-enumerations.h"
-#include "ARM64_GCC_Registers.h"
-#include "ARM64_DWARF_Registers.h"
+#include "Utility/ARM64_GCC_Registers.h"
+#include "Utility/ARM64_DWARF_Registers.h"
#ifndef GPR_OFFSET
#error GPR_OFFSET must be defined before including this header file
Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp Sat Sep 27 11:54:22 2014
@@ -10,7 +10,7 @@
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/RegisterValue.h"
#include "lldb/Target/Thread.h"
-#include "RegisterContextPOSIX.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
#include "RegisterContextPOSIXCore_mips64.h"
using namespace lldb_private;
Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp Sat Sep 27 11:54:22 2014
@@ -10,7 +10,7 @@
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/RegisterValue.h"
#include "lldb/Target/Thread.h"
-#include "RegisterContextPOSIX.h"
+#include "Plugins/Process/Utility/RegisterContextPOSIX.h"
#include "RegisterContextPOSIXCore_x86_64.h"
using namespace lldb_private;
Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp Sat Sep 27 11:54:22 2014
@@ -16,10 +16,10 @@
#include "ThreadElfCore.h"
#include "ProcessElfCore.h"
-#include "RegisterContextLinux_x86_64.h"
-#include "RegisterContextFreeBSD_i386.h"
-#include "RegisterContextFreeBSD_mips64.h"
-#include "RegisterContextFreeBSD_x86_64.h"
+#include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
#include "RegisterContextPOSIXCore_mips64.h"
#include "RegisterContextPOSIXCore_x86_64.h"
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sat Sep 27 11:54:22 2014
@@ -14,7 +14,6 @@
#include <errno.h>
#include <stdlib.h>
#ifndef LLDB_DISABLE_POSIX
-#include <spawn.h>
#include <netinet/in.h>
#include <sys/mman.h> // for mmap
#endif
Modified: lldb/trunk/source/Target/ProcessLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessLaunchInfo.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Target/ProcessLaunchInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp Sat Sep 27 11:54:22 2014
@@ -9,10 +9,6 @@
#include "lldb/Host/Config.h"
-#ifndef LLDB_DISABLE_POSIX
-#include <spawn.h>
-#endif
-
#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Target/FileAction.h"
#include "lldb/Target/Target.h"
Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Sat Sep 27 11:54:22 2014
@@ -43,7 +43,7 @@
#include "lldb/Target/ThreadSpec.h"
#include "lldb/Target/Unwind.h"
#include "Plugins/Process/Utility/UnwindLLDB.h"
-#include "UnwindMacOSXFrameBackchain.h"
+#include "Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h"
using namespace lldb;
Modified: lldb/trunk/tools/lldb-gdbserver/lldb-gdbserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-gdbserver/lldb-gdbserver.cpp?rev=218568&r1=218567&r2=218568&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-gdbserver/lldb-gdbserver.cpp (original)
+++ lldb/trunk/tools/lldb-gdbserver/lldb-gdbserver.cpp Sat Sep 27 11:54:22 2014
@@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/lldb-python.h"
-
// C Includes
#include <errno.h>
#include <getopt.h>
More information about the lldb-commits
mailing list