[Lldb-commits] [PATCH] Properly handle the DYLD attach step for GDB remotes.

Todd Fiala tfiala at google.com
Thu Sep 4 20:34:02 PDT 2014


Yep - see my comments here that came in about 30 minutes before you posted
your patch:

https://github.com/tfiala/lldb/issues/57

For using llgs (lldb-gdbserver) for local Linux debugging (i.e. using it
all the time, instead of ProcessLinux and ProcessMonitor), I follow Apple's
approach to launching the exe from the lldb side, but I work in a sync so
that the exe doesn't exec until after llgs attaches.  So, even though we're
"attaching" on the llgs side, it definitely is hitting the case where the
rendezvous isn't set up right.  You're working right in the code that I am
modifying as well.

There's one more check I think I'll need to add to what you're doing.  In
my scenario, the rendezvous partially resolves but the memory isn't set
yet, so the resolve step isn't sufficient for a check.  I'm going to ferret
that out hopefully tonight.

Thanks for digging into this!

-Todd


On Thu, Sep 4, 2014 at 3:44 PM, Stephane Sezer <sas at fb.com> wrote:

> No problem. Thanks :)
>
> This is basically a bug I found when working on remote debugging; it
> happens when the remote debugger starts the inferior itself. The inferior
> is blocked before hitting the entry point (before the rendezvous structure
> has been setup), which means we can’t load any shared object yet. AFAICT,
> this can only happen during remote debugging, as attaching to a live
> process with lldb directly would necessarily attach after the entry point.
>
> On Sep 4, 2014, at 3:32 PM, Todd Fiala <tfiala at google.com> wrote:
>
> > (I've also added a ton of logging on the 'enable log lldb dyld' flag).
> >
> > I'm heading out now but will look at this tonight since I'm all in that
> code too.
> >
> >
> > On Thu, Sep 4, 2014 at 3:28 PM, Todd Fiala <tfiala at google.com> wrote:
> > That's bizarre - I'm actually working on this exact code right now...
> >
> >
> > On Thu, Sep 4, 2014 at 3:24 PM, Stephane Sezer <sas at fb.com> wrote:
> >
> > _______________________________________________
> > lldb-commits mailing list
> > lldb-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
> >
> >
> >
> >
> > --
> > Todd Fiala |   Software Engineer |     tfiala at google.com |
> 650-943-3180
> >
> >
> >
> >
> > --
> > 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-commits/attachments/20140904/0bd24205/attachment.html>


More information about the lldb-commits mailing list