This patch is very likely not semantically correct, but it fixes compilation 
for now. I'll have to dig deeper into how the interface works.
Would be glad if someone could comment a bit on this one.
diff --git a/source/Plugins/Process/Linux/LinuxThread.cpp b/source/Plugins/Process/Linux/LinuxThread.cpp
index 6d4733a..9089d90 100644
--- a/source/Plugins/Process/Linux/LinuxThread.cpp
+++ b/source/Plugins/Process/Linux/LinuxThread.cpp
@@ -66,20 +66,6 @@ LinuxThread::GetStackFrameCount()
     return 0;
 }
 
-lldb::StackFrameSP
-LinuxThread::GetStackFrameAtIndex(uint32_t idx)
-{
-    if (idx == 0)
-    {
-        RegisterContextLinux *regs = GetRegisterContext();
-        StackFrame *frame = new StackFrame(
-            idx, *this, regs->GetFP(), regs->GetPC());
-        return lldb::StackFrameSP(frame);
-    }
-    else
-        return lldb::StackFrameSP();
-}
-
 RegisterContextLinux *
 LinuxThread::GetRegisterContext()
 {
@@ -105,28 +91,6 @@ LinuxThread::CreateRegisterContextForFrame(lldb_private::StackFrame *frame)
 }
 
 bool
-LinuxThread::GetRawStopReason(StopInfo *stop_info)
-{
-    stop_info->Clear();
-
-    switch (m_note)
-    {
-    default:
-        stop_info->SetStopReasonToNone();
-        break;
-
-    case eBreak:
-        stop_info->SetStopReasonWithBreakpointSiteID(m_breakpoint->GetID());
-        break;
-
-    case eTrace:
-        stop_info->SetStopReasonToTrace();
-    }
-
-    return true;
-}
-
-bool
 LinuxThread::WillResume(lldb::StateType resume_state)
 {
     SetResumeState(resume_state);
@@ -196,3 +160,10 @@ LinuxThread::ExitNotify()
 {
     m_note = eExit;
 }
+
+Unwind *
+LinuxThread::GetUnwinder ()
+{
+    return m_unwinder_ap.get();
+}
+
diff --git a/source/Plugins/Process/Linux/LinuxThread.h b/source/Plugins/Process/Linux/LinuxThread.h
index 79ccd0a..ed1b979 100644
--- a/source/Plugins/Process/Linux/LinuxThread.h
+++ b/source/Plugins/Process/Linux/LinuxThread.h
@@ -15,6 +15,7 @@
 #include <memory>
 
 // Other libraries and framework includes
+#include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Thread.h"
 #include "RegisterContextLinux.h"
 
@@ -41,9 +42,6 @@ public:
     uint32_t
     GetStackFrameCount();
 
-    lldb::StackFrameSP
-    GetStackFrameAtIndex(uint32_t idx);
-
     RegisterContextLinux *
     GetRegisterContext();
 
@@ -56,8 +54,6 @@ public:
     RegisterContextLinux *
     CreateRegisterContextForFrame(lldb_private::StackFrame *frame);
 
-    bool
-    GetRawStopReason(StopInfo *stop_info);
 
     //--------------------------------------------------------------------------
     // These methods form a specialized interface to linux threads.
@@ -68,6 +64,13 @@ public:
     void TraceNotify();
     void ExitNotify();
 
+    virtual lldb_private::Unwind *
+    GetUnwinder ();
+
+protected:
+    virtual lldb::StopInfoSP
+    GetPrivateStopReason ();
+
 private:
     std::auto_ptr<lldb_private::StackFrame> m_frame_ap;
     std::auto_ptr<RegisterContextLinux> m_register_ap;
diff --git a/source/Plugins/Process/Linux/ProcessLinux.cpp b/source/Plugins/Process/Linux/ProcessLinux.cpp
index ce12ee9..16c8a13 100644
--- a/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -105,6 +105,7 @@ Error
 ProcessLinux::DoLaunch(Module *module,
                        char const *argv[],
                        char const *envp[],
+                       uint32_t launch_flags,
                        const char *stdin_path,
                        const char *stdout_path,
                        const char *stderr_path)
@@ -414,13 +415,15 @@ ProcessLinux::UpdateLoadedSections()
     for (unsigned i = 0; i < num_sections; ++i)
     {
         Section *section = sections->GetSectionAtIndex(i).get();
-
         lldb::addr_t new_load_addr = section->GetFileAddress();
-        lldb::addr_t old_load_addr = GetSectionLoadAddress(section);
+        lldb::addr_t old_load_addr = m_target.GetSectionLoadList().GetSectionLoadAddress(section);
 
         if (old_load_addr == LLDB_INVALID_ADDRESS ||
-            old_load_addr != new_load_addr)
-            SectionLoaded(section, new_load_addr);
+            old_load_addr != new_load_addr) {
+
+// FIXME: do we even still need this?
+//            SectionLoaded(section, new_load_addr);
+    }
     }
 }
 
diff --git a/source/Plugins/Process/Linux/ProcessLinux.h b/source/Plugins/Process/Linux/ProcessLinux.h
index 522cc4b..3b266ab 100644
--- a/source/Plugins/Process/Linux/ProcessLinux.h
+++ b/source/Plugins/Process/Linux/ProcessLinux.h
@@ -63,12 +63,14 @@ public:
     DoAttachToProcessWithID(lldb::pid_t pid);
 
     virtual lldb_private::Error
-    DoLaunch(lldb_private::Module *module,
-             char const *argv[],
-             char const *envp[],
-             const char *stdin_path,
-             const char *stdout_path,
-             const char *stderr_path);
+    DoLaunch (lldb_private::Module* module,
+              char const *argv[],           // Can be NULL
+              char const *envp[],           // Can be NULL
+              uint32_t launch_flags,
+              const char *stdin_path,       // Can be NULL
+              const char *stdout_path,  // Can be NULL
+              const char *stderr_path); // Can be NULL
+
 
     virtual void
     DidLaunch();
diff --git a/source/Plugins/Process/Linux/ProcessMonitor.cpp b/source/Plugins/Process/Linux/ProcessMonitor.cpp
index 22b65e1..bf15bef 100644
--- a/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -510,7 +510,8 @@ WAIT_AGAIN:
 
 ProcessMonitor::~ProcessMonitor()
 {
-    Host::StopMonitoringChildProcess(m_monitor_handle);
+    // FIXME
+    //Host::StopMonitoringChildProcess(m_monitor_handle);
     StopOperationThread();
 
     close(m_terminal_fd);
@@ -651,7 +652,7 @@ ProcessMonitor::Launch(LaunchArgs *args)
     // current.
     inferior.reset(new LinuxThread(process, pid));
     process.GetThreadList().AddThread(inferior);
-    process.GetThreadList().SetCurrentThreadByID(pid);
+    process.GetThreadList().SetSelectedThreadByID(pid);
 
     // Let our process instance know the thread has stopped.
     process.SendMessage(ProcessMessage::Trace(pid));
diff --git a/source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp b/source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp
index 8994e77..4c78a25 100644
--- a/source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp
+++ b/source/Plugins/Process/Linux/RegisterContextLinux_x86_64.cpp
@@ -644,7 +644,7 @@ RegisterContextLinux_x86_64::ConvertRegisterKindToRegisterNumber(uint32_t kind,
     }
     else if (kind == eRegisterKindLLDB)
     {
-        return reg;
+        return num;
     }
 
     return LLDB_INVALID_REGNUM;
diff --git a/source/Plugins/Process/Utility/LibUnwindRegisterContext.h b/source/Plugins/Process/Utility/LibUnwindRegisterContext.h
index bd7d8bd..f0f6638 100644
--- a/source/Plugins/Process/Utility/LibUnwindRegisterContext.h
+++ b/source/Plugins/Process/Utility/LibUnwindRegisterContext.h
@@ -17,7 +17,10 @@
 #include "lldb/lldb-private.h"
 #include "lldb/Target/RegisterContext.h"
 
-#include "libunwind/include/libunwind.h"
+#include "libunwind.h"
+
+// FIXME: for libunwind.h
+using namespace lldb_private;
 
 class LibUnwindRegisterContext : public lldb_private::RegisterContext
 {
@@ -27,7 +30,7 @@ public:
     //------------------------------------------------------------------
     LibUnwindRegisterContext (lldb_private::Thread &thread,
                               lldb_private::StackFrame *frame,
-                              const lldb_private::unw_cursor_t &unwind_cursor);
+                              const unw_cursor_t &unwind_cursor);
 
     virtual
     ~LibUnwindRegisterContext ();
@@ -72,7 +75,7 @@ public:
     ConvertRegisterKindToRegisterNumber (uint32_t kind, uint32_t num);
     
 private:
-    lldb_private::unw_cursor_t m_unwind_cursor;
+    unw_cursor_t m_unwind_cursor;
     bool m_unwind_cursor_is_valid;
     //------------------------------------------------------------------
     // For LibUnwindRegisterContext only
diff --git a/source/Plugins/Process/Utility/UnwindLibUnwind.h b/source/Plugins/Process/Utility/UnwindLibUnwind.h
index 8b3489b..c7e2de4 100644
--- a/source/Plugins/Process/Utility/UnwindLibUnwind.h
+++ b/source/Plugins/Process/Utility/UnwindLibUnwind.h
@@ -15,17 +15,19 @@
 #include <vector>
 
 // Other libraries and framework includes
-#include "libunwind/include/libunwind.h"
+#include "libunwind.h"
 
 // Project includes
 #include "lldb/lldb-private.h"
 #include "lldb/Target/Unwind.h"
 
+using namespace lldb_private;
+
 class UnwindLibUnwind : public lldb_private::Unwind
 {
 public: 
     UnwindLibUnwind (lldb_private::Thread &thread, 
-                     lldb_private::unw_addr_space_t addr_space);
+                     unw_addr_space_t addr_space);
     
     virtual
     ~UnwindLibUnwind()
@@ -53,8 +55,8 @@ public:
     GetThread();
 
 private:
-    lldb_private::unw_addr_space_t m_addr_space;
-    std::vector<lldb_private::unw_cursor_t> m_cursors;
+    unw_addr_space_t m_addr_space;
+    std::vector<unw_cursor_t> m_cursors;
     uint32_t m_pc_regnum;
     uint32_t m_sp_regnum;
     //------------------------------------------------------------------
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to