<div dir="ltr"><div class="gmail_quote">+Petar</div><div class="gmail_quote"><br></div><div class="gmail_quote">Hi Mohit,</div><div class="gmail_quote"><br></div><div class="gmail_quote">I wanted to make sure you are aware of some work we're doing on Linux.  We're adding support for remote Linux (and Android) targets via PlatformRemoteGDBServer and lldb-gdbserver.  We would also like to replace local Linux debugging support with a connection to a local lldb-gdbserver instance.  This way there will only be one code path for Linux local or remote debugging.  We intend to make the remote support for Linux/Android very good so we expect this will be a significant step forward for local Linux debugging.  </div><div class="gmail_quote"><br></div><div class="gmail_quote">Some of our work isn't ready to upstream yet so we're working out of a separate branch.  </div><div class="gmail_quote"><br></div><div class="gmail_quote">Here are instructions for building and running our tree.  The most important bit is "export PLATFORM_LINUX_FORCE_LLGS_LOCAL=1"  which enables the code paths for local debugging via a local lldb-gdbserver instance.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><span id="docs-internal-guid-42f43eaa-ca88-da71-c054-2a7517bef5a6"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">#!/bin/bash</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">ROOT_DIR=$HOME/ll/googd</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">mkdir -p $ROOT_DIR</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">cd $ROOT_DIR</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font face="monospace, monospace"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">git clone </span><a href="http://github.com/tfiala/lldb.git" style="text-decoration:none"><span style="font-size:11px;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">http://github.com/tfiala/lldb.git</span></a></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">(cd lldb && git checkout dev-thread-state-coordinator)</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font face="monospace, monospace"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">git clone </span><a href="http://llvm.org/git/llvm.git" style="text-decoration:none"><span style="font-size:11px;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">http://llvm.org/git/llvm.git</span></a></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">(cd llvm && git checkout 7d7b761cd0f4f4d17a79324668b1ec758b7791ad)</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font face="monospace, monospace"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">git clone </span><a href="http://llvm.org/git/clang.git" style="text-decoration:none"><span style="font-size:11px;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">http://llvm.org/git/clang.git</span></a></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">(cd clang && git checkout 7894c14c006941684f6c8964ed71c9b14c3f0edb)</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font face="monospace, monospace"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">git clone </span><a href="http://github.com/tfiala/lldb-tools" style="text-decoration:none"><span style="font-size:11px;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">http://github.com/tfiala/lldb-tools</span></a></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">cd llvm/tools</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">ln -s ../../clang clang</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">ln -s ../../lldb lldb</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">cd $ROOT_DIR</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">lldb-tools/scripts/lldb_configure.py -c -n -l -g -s -a --ccache -b build</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">cd build</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace"># use lldb-gdbserver when debugging local processes</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">export PLATFORM_LINUX_FORCE_LLGS_LOCAL=1</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font face="monospace, monospace">ninja && ninja check-lldb</font></span></p><div><span style="font-size:11px;font-family:Consolas;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><br></span></div></span></div><div class="gmail_quote">Vince</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On Jan 8, 2015 1:49 AM, "Mohit K. Bhakkad" <<a href="mailto:mohit.bhakkad@imgtec.com" target="_blank">mohit.bhakkad@imgtec.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: mohit.bhakkad<br>
Date: Thu Jan  8 03:46:29 2015<br>
New Revision: 225436<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225436&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=225436&view=rev</a><br>
Log:<br>
[LLDB][MIPS] Adding SoftwareBreakpointTrapOpcode and RelocationJumpSlotType for MIPS<br>
<br>
Patch by Bhushan Attarde<br>
<br>
Reviewers: clayborg<br>
<br>
Reviewed By: clayborg<br>
<br>
Subscribers: petarj, dsanders, mohit.bhakkad, lldb-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D6861" target="_blank">http://reviews.llvm.org/D6861</a><br>
<br>
Modified:<br>
    lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp<br>
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp<br>
<br>
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=225436&r1=225435&r2=225436&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=225436&r1=225435&r2=225436&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp (original)<br>
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Thu Jan  8 03:46:29 2015<br>
@@ -195,6 +195,9 @@ ELFHeader::GetRelocationJumpSlotType() c<br>
     case EM_AARCH64:<br>
         slot = R_AARCH64_JUMP_SLOT;<br>
         break;<br>
+    case EM_MIPS:<br>
+        slot = R_MIPS_JUMP_SLOT;<br>
+        break;<br>
     }<br>
<br>
     return slot;<br>
<br>
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=225436&r1=225435&r2=225436&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=225436&r1=225435&r2=225436&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)<br>
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu Jan  8 03:46:29 2015<br>
@@ -583,6 +583,13 @@ PlatformLinux::GetSoftwareBreakpointTrap<br>
             }<br>
         }<br>
         break;<br>
+    case llvm::Triple::mips64:<br>
+        {<br>
+            static const uint8_t g_hex_opcode[] = { 0x00, 0x00, 0x00, 0x0d };<br>
+            trap_opcode = g_hex_opcode;<br>
+            trap_opcode_size = sizeof(g_hex_opcode);<br>
+        }<br>
+        break;<br>
     }<br>
<br>
     if (bp_site->SetTrapOpcode(trap_opcode, trap_opcode_size))<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</blockquote></div>
</div>