<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 --- - 64 bit lldb cannot call functions in 32 bit debuggees"
   href="http://llvm.org/bugs/show_bug.cgi?id=16580">16580</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>64 bit lldb cannot call functions in 32 bit debuggees
          </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>sorrels.m@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The Linux 64 bit version of lldb fails test TestCallCPPFunction.py when using a
32-bit debuggee (using the LLDB_TEST_ARGUMENTS="-A i386" flag for running the
test).  The failure happens when it tries to call the function in the debuggee
called a_function_to_call().

This same kind of architure thunking appears to be broken on a few other tests
as well (TestCPPStaticMethods.py)

Here's the output of a session doing this test by hand:

(lldb) file
/data/work/llvm/llvm/tools/lldb.svn/test/lang/cpp/call-function/a.out
Current executable set to
'/data/work/llvm/llvm/tools/lldb.svn/test/lang/cpp/call-function/a.out' (i386).
(lldb) breakpoint set -l 10 main.cpp
Breakpoint 1: where = a.out`main + 3 at main.cpp:10, address = 0x08048443
(lldb) run
Process 3356 launched:
'/data/work/llvm/llvm/tools/lldb.svn/test/lang/cpp/call-function/a.out' (i386)
Process 3356 stopped
* thread #1: tid = 0x0d1c, 0x08048443 a.out`main + 3 at main.cpp:10, stop
reason = breakpoint 1.1
    frame #0: 0x08048443 a.out`main + 3 at main.cpp:10
   7       
   8       int main()
   9       {
-> 10          printf("%d\n", a_function_to_call()); // breakpoint
   11      }
thread list
Process 3356 stopped
* thread #1: tid = 0x0d1c, 0x08048443 a.out`main + 3 at main.cpp:10, stop
reason = breakpoint 1.1
(lldb) expression -- a_function_to_call()
error: Execution was interrupted, reason: invalid address (fault address:
0xeeef4020).
The process has been returned to the state before expression evaluation.
(lldb)</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>