<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Can't debug with gdbserver on Linux with top of tree lldb"
   href="http://llvm.org/bugs/show_bug.cgi?id=18965">18965</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't debug with gdbserver on Linux with top of tree lldb
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>spucci@google.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12140" name="attach_12140" title="tar file containing test directory">attachment 12140</a> <a href="attachment.cgi?id=12140&action=edit" title="tar file containing test directory">[details]</a></span>
tar file containing test directory

If I try to attach to a gdbserver with lldb on Ubuntu 12.04 or Ubuntu 13.10,
lldb attaches to the process, successfully stops the program, but is unable to
display the stack or dump the registers:

  (lldb) bt
  * thread #1: tid = 7330, , stop reason = signal SIGTRAP
    * frame #0: 
  (lldb) register read
  error: invalid frame
  (lldb) 

The commands I'm using to connect to the gdbserver are:

  platform select remote-linux
  target create --arch x86_64--linux-gnu ./foo
  gdb-remote localhost:2388

Trying without the "platform select" line gives the same results, as does
removing the --arch x86_64--linux-gnu

A test directory is attached to this bug report.  In that test directory, run
the following, *each in its own shell window* :

- make run  # will run executable, which has an infinite loop of sleep(1)
- make gdbserver # will bring up gdbserver, attaching to the executable
- lldb # will execute commands in .lldbinit, attaching to gdbserver</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>