[lldb-dev] Linux issues where I am not getting breakpoints...

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Tue Apr 11 05:33:18 PDT 2017


Are you sure this is not just an artifact of stdio buffering? I tried the
same experiment, but I placed a real log statement, and I could see that
all the LoadModuleAtAddress calls happen between the $T and $c packets in
the gdb-remote packet sequence.

The module loading should be synchronous, so I think the problem lies
elsewhere.

What is the nature of the breakpoint that is not getting hit? Can you
provide a repro case? The only bug like this that I am aware of is that we
fail to hit breakpoints in global constructors in shared libraries, but
that hasn't worked even in 3.8..



On 10 April 2017 at 22:51, Greg Clayton via lldb-dev <
lldb-dev at lists.llvm.org> wrote:

> I have added some logging to a program that is not hitting breakpoints
> with LLDB top of tree SVN. An older lldb 3.8 hits the breakpoint just fine.
> I placed some logging in LLDB:
>
> ModuleSP DynamicLoader::LoadModuleAtAddress(const FileSpec &file,
>                                             addr_t link_map_addr,
>                                             addr_t base_addr,
>                                             bool base_addr_is_offset) {
>   printf("%s: lma = 0x%16.16llx, ba = 0x%16.16llx, baio = %i\n",
> file.GetPath().c_str(), link_map_addr, base_addr, base_addr_is_offset);
>
>
> This is called by DynamicLoaderPOSIXDYLD::LoadAllCurrentModules().
>
> My problem is I see:
>
> [vdso]: lma = 0xffffffffffffffff, ba = 0x00007ffff7ffa000, baio = 0
> linux-vdso.so.1: lma = 0x00007ffff7ffe6e0, ba = 0x00007ffff7ffa000, baio =
> 1
> /tmp/liba.so: lma = 0x00007ffff7ff66a8, ba = 0x00007ffff7e30000, baio = 1
> 8 locations added to breakpoint 1
> /tmp/libb.so: lma = 0x00007ffff7e2f000, ba = 0x00007ffff7d43000, baio = 1
> [==========] Running 14 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 14 tests from MyTest
> [ RUN      ] MyTest.Test1
> [       OK ] MyTest.Test1 (0 ms)
> /tmp/libc.so: lma = 0x00007ffff7e2f000, ba = 0x00007ffff7d43000, baio = 1
> /tmp/libd.so: lma = 0x00007ffff7e2f000, ba = 0x00007ffff7d43000, baio = 1
>
>
> Note that I see program output _during_ the messages that are showing that
> shared libraries are being loaded? I would assume we are loading shared
> libraries synchronously, but the log seems to indicated otherwise.
>
> If anyone knows anything on this subject please let me know...
>
> Greg Clayton
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170411/26e98b31/attachment.html>


More information about the lldb-dev mailing list