<div dir="ltr">Hey Matthew,<div><br></div><div>I just did a double check on my Ubuntu 13.10 x86 VM. Here were the results I got, which seem to be different than yours (I've got an x86 32-bit exe debugging fine with an x86 32-bit lldb):</div>
<div><br></div><div><div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ uname -a</font></div><div><font size="1" face="courier new, monospace">Linux ub-x86-13.10-01 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:53:31 UTC 2014 i686 i686 i686 GNU/Linux</font></div>
<div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ pushd ../llvm/tools/lldb</font></div><div><font size="1" face="courier new, monospace">~/lldb/work/llvm/tools/lldb ~/lldb/work/build</font></div>
<div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/llvm/tools/lldb$ git log | head</font></div><div><font size="1" face="courier new, monospace">commit aa7f071df1e47c4d63b4cab81c5b3a375e4b4a50</font></div>
<div><font size="1" face="courier new, monospace">Author: Ed Maste <<a href="mailto:emaste@freebsd.org">emaste@freebsd.org</a>></font></div><div><font size="1" face="courier new, monospace">Date: Fri Feb 28 13:46:51 2014 +0000</font></div>
<div><font size="1" face="courier new, monospace"><br></font></div><div><font size="1" face="courier new, monospace"> Fix types to eliminate compiler warnings in FreeBSD host class</font></div><div><font size="1" face="courier new, monospace"> </font></div>
<div><font size="1" face="courier new, monospace"> </font></div><div><font size="1" face="courier new, monospace"> git-svn-id: <a href="https://llvm.org/svn/llvm-project/lldb/">https://llvm.org/svn/llvm-project/lldb/</a><b>trunk@202498</b> 91177308-0d34-0410-b5e6-96231b3b80d8</font></div>
<div><font size="1" face="courier new, monospace"><br></font></div><div><font size="1" face="courier new, monospace">commit 3ca8916b078d298cc42ed61ffa2739c67daf7987</font></div><div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/llvm/tools/lldb$ # svn trunk@202498</font></div>
<div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/llvm/tools/lldb$ popd</font></div><div><font size="1" face="courier new, monospace">~/lldb/work/build</font></div><div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ file ~/play/size_data/main</font></div>
<div><font size="1" face="courier new, monospace">/home/tfiala/play/size_data/main: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x1749b467dda063db39d8bf61a26aec8e2f7a062e, not stripped</font></div>
<div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ lldb -v</font></div><div><font size="1" face="courier new, monospace">lldb: command not found</font></div><div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ bin/lldb -v</font></div>
<div><font size="1" face="courier new, monospace">lldb version 3.5 (<a href="http://llvm.org/git/lldb.git">http://llvm.org/git/lldb.git</a> revision aa7f071df1e47c4d63b4cab81c5b3a375e4b4a50)</font></div><div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ bin/lldb ~/play/size_data/main</font></div>
<div><font size="1" face="courier new, monospace">Current executable set to '/home/tfiala/play/size_data/main' (i386).</font></div><div><font size="1" face="courier new, monospace">(lldb) b main.cpp:5</font></div>
<div><font size="1" face="courier new, monospace">Breakpoint 1: where = main`main + 9 at main.cpp:5, address = 0x08048426</font></div><div><font size="1" face="courier new, monospace">(lldb) run</font></div><div><font size="1" face="courier new, monospace">Process 24270 launching</font></div>
<div><font size="1" face="courier new, monospace">Process 24270 stopped</font></div><div><font size="1" face="courier new, monospace">* thread #1: tid = 24270, 0xb775f190, name = 'main', stop reason = trace</font></div>
<div><font size="1" face="courier new, monospace"> frame #0: 0xb775f190</font></div><div><font size="1" face="courier new, monospace">-> 0xb775f190: movl %esp, %eax</font></div><div><font size="1" face="courier new, monospace"> 0xb775f192: calll 0xb7762b70</font></div>
<div><font size="1" face="courier new, monospace"> 0xb775f197: movl %eax, %edi</font></div><div><font size="1" face="courier new, monospace"> 0xb775f199: calll 0xb775f180</font></div><div><font size="1" face="courier new, monospace">(lldb) Process 24270 launched: '/home/tfiala/play/size_data/main' (i386)</font></div>
<div><font size="1" face="courier new, monospace">Process 24270 stopped</font></div><div><font size="1" face="courier new, monospace">* thread #1: tid = 24270, 0x08048426 main`main + 9 at main.cpp:5, name = 'main', stop reason = breakpoint 1.1</font></div>
<div><font size="1" face="courier new, monospace"> frame #0: 0x08048426 main`main + 9 at main.cpp:5</font></div><div><font size="1" face="courier new, monospace"> 2 <span class="" style="white-space:pre"> </span></font></div>
<div><font size="1" face="courier new, monospace"> 3 <span class="" style="white-space:pre"> </span>int main()</font></div><div><font size="1" face="courier new, monospace"> 4 <span class="" style="white-space:pre"> </span>{</font></div>
<div><font size="1" face="courier new, monospace">-> 5 <span class="" style="white-space:pre"> </span> printf("sizeof(long int): %u\n", sizeof(long int));</font></div><div><font size="1" face="courier new, monospace"> 6 <span class="" style="white-space:pre"> </span> return 0;</font></div>
<div><font size="1" face="courier new, monospace"> 7 <span class="" style="white-space:pre"> </span>}</font></div><div><font size="1" face="courier new, monospace">(lldb) step</font></div><div><font size="1" face="courier new, monospace">Process 24270 stopped</font></div>
<div><font size="1" face="courier new, monospace">* thread #1: tid = 24270, 0xb75e27df libc.so.6`__printf(format=0x080484e0) + 15 at printf.c:33, name = 'main', stop reason = step in</font></div><div><font size="1" face="courier new, monospace"> frame #0: 0xb75e27df libc.so.6`__printf(format=0x080484e0) + 15 at printf.c:33</font></div>
<div><font size="1" face="courier new, monospace">(lldb) bt</font></div><div><font size="1" face="courier new, monospace">* thread #1: tid = 24270, 0xb75e27df libc.so.6`__printf(format=0x080484e0) + 15 at printf.c:33, name = 'main', stop reason = step in</font></div>
<div><font size="1" face="courier new, monospace"> * frame #0: 0xb75e27df libc.so.6`__printf(format=0x080484e0) + 15 at printf.c:33</font></div><div><font size="1" face="courier new, monospace"> frame #1: 0x0804843a main`main + 29 at main.cpp:5</font></div>
<div><font size="1" face="courier new, monospace">(lldb) exit</font></div><div><font size="1" face="courier new, monospace">Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y</font></div>
<div><font size="1" face="courier new, monospace">tfiala@ub-x86-13:~/lldb/work/build$ </font></div></div><div><br></div><div>I'm building with gcc 4.8.1 (stock on that machine), with packages:</div><div>swig</div><div>
libedit-dev</div><div>python-dev</div><div>ncurses-dev</div><div><br></div><div>I happen to be using cmake/ninja to build this. If you're using configure/make, I can try that too to make sure there isn't any difference.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 28, 2014 at 6:58 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Matthew,<div class=""><div><br></div><div>> Initial investigations suggest that the offset of dr6 is being calculated incorrectly. The trace says 0x2A8, it should be 0x114.</div>
<div><br></div></div><div>That sounds like you are once again seeing an x86_64 register infos section (using the x86_64 fpu register set) vs. the i386 set IIRC.</div>
<div><br></div><div>Your host is a 32-bit x86 architecture, right? (The one where you are running lldb?)</div><div><br></div><div>If you do a svn status or git status, can you double check that you don't have any local changes? I'll try on a 32-bit host with a clean repo to make sure I didn't have any cruft on my end confusing the results.</div>
</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Fri, Feb 28, 2014 at 6:02 AM, Matthew Gardiner <span dir="ltr"><<a href="mailto:mg11@csr.com" target="_blank">mg11@csr.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Initial investigations suggest that the offset of dr6 is being calculated incorrectly. The trace says 0x2A8, it should be 0x114.<div><br>
<br>
(lldb) log enable linux ptrace<br>
(lldb) run<br></div>
operation ptrace(PTRACE_SETOPTIONS, 3665, (nil), 0x58, 0)=0 called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 1456<br>
Process 3665 launching<div><br>
operation ptrace(PTRACE_TRACEME, 0, (nil), (nil), 0)=0 called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 1196<br></div>
operation ptrace(PTRACE_PEEKDATA, 3665, 0x8048340, (nil), 0)=895EED31 called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 245<br>
operation ptrace(PTRACE_PEEKDATA, 3665, 0x8048340, (nil), 0)=895EED31 called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 245<br>
operation ptrace(PTRACE_POKEDATA, 3665, 0x8048340, 0x895eedcc, 0)=0 called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 319<br>
operation ptrace(PTRACE_PEEKDATA, 3665, 0x8048340, (nil), 0)=895EEDCC called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 245<br>
MATTG IWH begin<br>
WriteRegisterValue dr6 tid=3665 offset=2A8 val=FFFFFFFF<br>
operation ptrace(PTRACE_POKEUSER, 3665, 0x2a8, 0xffffffff, 0)=FFFFFFFF called from file /home/mg11/src/heracles2/llvm/<u></u>tools/lldb/source/Plugins/<u></u>Process/Linux/ProcessMonitor.<u></u>cpp line 543<div>
<div><br>
<br>
<br>
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom<br>
More information can be found at <a href="http://www.csr.com" target="_blank">www.csr.com</a>. Keep up to date with CSR on our technical blog, <a href="http://www.csr.com/blog" target="_blank">www.csr.com/blog</a>, CSR people blog, <a href="http://www.csr.com/people" target="_blank">www.csr.com/people</a>, YouTube, <a href="http://www.youtube.com/user/CSRplc" target="_blank">www.youtube.com/user/CSRplc</a>, Facebook, <a href="http://www.facebook.com/pages/CSR/191038434253534" target="_blank">www.facebook.com/pages/CSR/<u></u>191038434253534</a>, or follow us on Twitter at <a href="http://www.twitter.com/CSR_plc" target="_blank">www.twitter.com/CSR_plc</a>.<br>
New for 2014, you can now access the wide range of products powered by aptX at <a href="http://www.aptx.com" target="_blank">www.aptx.com</a>.<br>
______________________________<u></u>_________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'">
<tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>