[lldb-dev] Further Linux adventures

Joel Dillon joelrdillon at gmail.com
Wed Oct 26 15:34:05 PDT 2011


I now have lldb compiling and attempting to execute a program. There seems
to be an assumption in the code that sizeof(int) is 8 on a 64 bit platform.
This is not the case with Linux/gcc 4.6, leading to some rather nasty bugs
(the return value of ptrace() was being assigned to an int, truncating data
from peeks, for instance!). I've fixed the ptrace() issue but another one is
happening somewhere around breakpoints. I added some logging which displays
the problem -

Process 4017 launched: '/home/jo/reader/calliope' (x86_64)
(lldb) Looking for address 406780, list size is 1
Entry 0 is 406780 sizeof 8
Looking for address 270f9300, list size is 2
Entry 0 is 406780 sizeof 8
Entry 1 is 7ffb270f9300 sizeof 8
lldb:
/home/jo/lldb/llvm/tools/lldb/source/Plugins/Process/Linux/LinuxThread.cpp:249:
void LinuxThread::BreakNotify(const ProcessMessage&): Assertion `bp_site'
failed.

Clearly the second breakpoint address is being truncated down to 32 bits
somewhere in the code. Before I go spelunking in the Linux subdirectories,
is sizeof(int)==8 something that the development team is assuming based on
MacOS X? If so, after all, it would be more worth my time to make gcc comply
with the OS X definition.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20111026/f1cd2c20/attachment.html>


More information about the lldb-dev mailing list