[lldb-dev] 32-bit linux IsWatchpointHit assertion failure due to WriteRegister
Todd Fiala
tfiala at google.com
Fri Feb 28 08:13:39 PST 2014
Hey Matthew,
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):
tfiala at ub-x86-13:~/lldb/work/build$ uname -a
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
tfiala at ub-x86-13:~/lldb/work/build$ pushd ../llvm/tools/lldb
~/lldb/work/llvm/tools/lldb ~/lldb/work/build
tfiala at ub-x86-13:~/lldb/work/llvm/tools/lldb$ git log | head
commit aa7f071df1e47c4d63b4cab81c5b3a375e4b4a50
Author: Ed Maste <emaste at freebsd.org>
Date: Fri Feb 28 13:46:51 2014 +0000
Fix types to eliminate compiler warnings in FreeBSD host class
git-svn-id:
https://llvm.org/svn/llvm-project/lldb/*trunk@202498*91177308-0d34-0410-b5e6-96231b3b80d8
commit 3ca8916b078d298cc42ed61ffa2739c67daf7987
tfiala at ub-x86-13:~/lldb/work/llvm/tools/lldb$ # svn trunk at 202498
tfiala at ub-x86-13:~/lldb/work/llvm/tools/lldb$ popd
~/lldb/work/build
tfiala at ub-x86-13:~/lldb/work/build$ file ~/play/size_data/main
/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
tfiala at ub-x86-13:~/lldb/work/build$ lldb -v
lldb: command not found
tfiala at ub-x86-13:~/lldb/work/build$ bin/lldb -v
lldb version 3.5 (http://llvm.org/git/lldb.git revision
aa7f071df1e47c4d63b4cab81c5b3a375e4b4a50)
tfiala at ub-x86-13:~/lldb/work/build$ bin/lldb ~/play/size_data/main
Current executable set to '/home/tfiala/play/size_data/main' (i386).
(lldb) b main.cpp:5
Breakpoint 1: where = main`main + 9 at main.cpp:5, address = 0x08048426
(lldb) run
Process 24270 launching
Process 24270 stopped
* thread #1: tid = 24270, 0xb775f190, name = 'main', stop reason = trace
frame #0: 0xb775f190
-> 0xb775f190: movl %esp, %eax
0xb775f192: calll 0xb7762b70
0xb775f197: movl %eax, %edi
0xb775f199: calll 0xb775f180
(lldb) Process 24270 launched: '/home/tfiala/play/size_data/main' (i386)
Process 24270 stopped
* thread #1: tid = 24270, 0x08048426 main`main + 9 at main.cpp:5, name =
'main', stop reason = breakpoint 1.1
frame #0: 0x08048426 main`main + 9 at main.cpp:5
2
3 int main()
4 {
-> 5 printf("sizeof(long int): %u\n", sizeof(long int));
6 return 0;
7 }
(lldb) step
Process 24270 stopped
* thread #1: tid = 24270, 0xb75e27df libc.so.6`__printf(format=0x080484e0)
+ 15 at printf.c:33, name = 'main', stop reason = step in
frame #0: 0xb75e27df libc.so.6`__printf(format=0x080484e0) + 15 at
printf.c:33
(lldb) bt
* thread #1: tid = 24270, 0xb75e27df libc.so.6`__printf(format=0x080484e0)
+ 15 at printf.c:33, name = 'main', stop reason = step in
* frame #0: 0xb75e27df libc.so.6`__printf(format=0x080484e0) + 15 at
printf.c:33
frame #1: 0x0804843a main`main + 29 at main.cpp:5
(lldb) exit
Quitting LLDB will kill one or more processes. Do you really want to
proceed: [Y/n] y
tfiala at ub-x86-13:~/lldb/work/build$
I'm building with gcc 4.8.1 (stock on that machine), with packages:
swig
libedit-dev
python-dev
ncurses-dev
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.
On Fri, Feb 28, 2014 at 6:58 AM, Todd Fiala <tfiala at google.com> wrote:
> Hey Matthew,
>
> > Initial investigations suggest that the offset of dr6 is being
> calculated incorrectly. The trace says 0x2A8, it should be 0x114.
>
> 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.
>
> Your host is a 32-bit x86 architecture, right? (The one where you are
> running lldb?)
>
> 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.
>
>
> On Fri, Feb 28, 2014 at 6:02 AM, Matthew Gardiner <mg11 at csr.com> wrote:
>
>> Initial investigations suggest that the offset of dr6 is being calculated
>> incorrectly. The trace says 0x2A8, it should be 0x114.
>>
>>
>> (lldb) log enable linux ptrace
>> (lldb) run
>> operation ptrace(PTRACE_SETOPTIONS, 3665, (nil), 0x58, 0)=0 called from
>> file /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 1456
>> Process 3665 launching
>>
>> operation ptrace(PTRACE_TRACEME, 0, (nil), (nil), 0)=0 called from file
>> /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 1196
>> operation ptrace(PTRACE_PEEKDATA, 3665, 0x8048340, (nil), 0)=895EED31
>> called from file /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 245
>> operation ptrace(PTRACE_PEEKDATA, 3665, 0x8048340, (nil), 0)=895EED31
>> called from file /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 245
>> operation ptrace(PTRACE_POKEDATA, 3665, 0x8048340, 0x895eedcc, 0)=0
>> called from file /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 319
>> operation ptrace(PTRACE_PEEKDATA, 3665, 0x8048340, (nil), 0)=895EEDCC
>> called from file /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 245
>> MATTG IWH begin
>> WriteRegisterValue dr6 tid=3665 offset=2A8 val=FFFFFFFF
>> operation ptrace(PTRACE_POKEUSER, 3665, 0x2a8, 0xffffffff, 0)=FFFFFFFF
>> called from file /home/mg11/src/heracles2/llvm/tools/lldb/source/Plugins/
>> Process/Linux/ProcessMonitor.cpp line 543
>>
>>
>>
>> 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
>> More information can be found at www.csr.com. Keep up to date with CSR
>> on our technical blog, www.csr.com/blog, CSR people blog,
>> www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook,
>> www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at
>> www.twitter.com/CSR_plc.
>> New for 2014, you can now access the wide range of products powered by
>> aptX at www.aptx.com.
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>
>
>
>
> --
> Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
>
--
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140228/9843114d/attachment.html>
More information about the lldb-dev
mailing list