Jai ++ Thanks for rectifying these linux problems. These patches look just fine from my standpoint … though i can't commit them myself.
Since i'm the one who contributed to these problems for linux, i have in my queue of things to set up: a linux build on ubuntu to make certain you don't have to fix these things again in the future. Regards, ++ Kirk On 2011-Feb-5, at 1:51 PM, ext Jai Menon wrote: Hello, Patch 1 squashes these fixes into a single diff - r124942 removed a sys/wait.h inclusion. This is incorrect for Linux. - SetArch was removed which breaks the build on Linux. - Linux doesn't support RTLD_FIRST so apply that mode conditionally. Patch 2 fixes a missing include. On an unrelated note, is there a git mirror of lldb? Would patches created with git be okay? -- Jai Menon
Index: include/lldb/Core/ArchSpec.h
===================================================================
--- include/lldb/Core/ArchSpec.h (revision 124972)
+++ include/lldb/Core/ArchSpec.h (working copy)
@@ -269,6 +269,14 @@
m_sub = sub;
}
+ void
+ SetElfArch (uint32_t cpu, uint32_t sub)
+ {
+ m_type = lldb::eArchTypeELF;
+ m_cpu = cpu;
+ m_sub = sub;
+ }
+
//------------------------------------------------------------------
/// Returns the default endianness of the architecture.
///
Index: source/Host/common/Host.cpp
===================================================================
--- source/Host/common/Host.cpp (revision 124972)
+++ source/Host/common/Host.cpp (working copy)
@@ -25,6 +25,8 @@
#include <libproc.h>
#include <mach-o/dyld.h>
#include <sys/sysctl.h>
+#elif defined (__linux__)
+#include <sys/wait.h>
#endif
using namespace lldb;
@@ -243,7 +245,7 @@
}
}
#elif defined (__linux__)
- g_host_arch.SetArch(7u, 144u);
+ g_host_arch.SetElfArch(7u, 144u);
#endif
}
return g_host_arch;
@@ -648,7 +650,11 @@
char path[PATH_MAX];
if (file_spec.GetPath(path, sizeof(path)))
{
+#if defined (__linux__)
+ dynamic_library_handle = ::dlopen (path, RTLD_LAZY | RTLD_GLOBAL);
+#else
dynamic_library_handle = ::dlopen (path, RTLD_LAZY | RTLD_GLOBAL | RTLD_FIRST);
+#endif
if (dynamic_library_handle)
{
error.Clear();
Index: source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp
===================================================================
--- source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp (revision 124972)
+++ source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp (working copy)
@@ -14,6 +14,7 @@
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Scalar.h"
#include "lldb/Target/Thread.h"
+#include "lldb/Host/Endian.h"
#include "ProcessLinux.h"
#include "ProcessMonitor.h"
@@ -500,7 +501,7 @@
}
if (status)
- data.SetData(buf + GetRegOffset(reg), GetRegSize(reg), endian::InlHostByteOrder());
+ data.SetData(buf + GetRegOffset(reg), GetRegSize(reg), lldb::endian::InlHostByteOrder());
return status;
}
++ kirk beitz : nokia : austin + san diego : [email protected] ++ |
_______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
