[lldb-dev] Process::SyncIOHandler(), everyone please try out the following patch

Zachary Turner zturner at google.com
Mon Apr 6 15:28:14 PDT 2015


Hi Greg,

This latest patch appears to have ANSI escape codes in it.  Any chance you
can re-upload?

On Mon, Apr 6, 2015 at 2:41 PM Greg Clayton <gclayton at apple.com> wrote:

> So do you still have problems with the prompt coming out at the wrong time
> or getting interspersed on FreeBSD with top of tree? It is just made worse
> by this patch?
>
> Try this patch:
>
>
>
> It changes the Predicate to use a uint32_t instead and it increments the
> predicate when the process resumes. Clients must first get the current
> IOHandler ID, then call something that resumes the process (continue or
> step) and then call Process::SyncIOHandler(iohandler_id, <timeout>).
>
> Let me know if this makes anything better or worse?
>
> > On Apr 6, 2015, at 2:03 PM, Ed Maste <emaste at freebsd.org> wrote:
> >
> > On 6 April 2015 at 16:37, Greg Clayton <gclayton at apple.com> wrote:
> >> Can everyone try and apply the following patch and run your test suite
> and also use LLDB for a while?
> >
> > Test run looks equivalent on FreeBSD - I had two failures on my desktop:
> >
> > FAIL: LLDB (suite) :: TestEvents.py (FreeBSD feynman 10.1-STABLE
> > FreeBSD 10.1-STABLE #28 r280427+86df2de(stable-10): Thu Mar 26
> > 16:07:47 EDT 2015
> > emaste at feynman:/tank/emaste/obj/tank/emaste/src/git-
> stable-10/sys/GENERIC
> > amd64 amd64)
> > FAIL: LLDB (suite) :: TestSendSignal.py (FreeBSD feynman 10.1-STABLE
> > FreeBSD 10.1-STABLE #28 r280427+86df2de(stable-10): Thu Mar 26
> > 16:07:47 EDT 2015
> > emaste at feynman:/tank/emaste/obj/tank/emaste/src/git-
> stable-10/sys/GENERIC
> > amd64 amd64)
> >
> > The first fails intermittently for me under load, while the second has
> > been failing for a while.
> >
> > The change seems to make the lldb-prompt-at-the-wrong-time problem
> > worse (or at least, no better) during interactive single stepping
> > though. For example:
> >
> > % bin/lldb /bin/ls
> > (lldb) target create "/bin/ls"
> > Current executable set to '/bin/ls' (x86_64).
> > (lldb) b main
> > Breakpoint 1: where = ls`main + 33 at ls.c:163, address =
> 0x00000000004023f1
> > (lldb) run
> > Process 58244 launching
> > Process 58244 launched: '/bin/ls' (x86_64)
> > (lldb) Process 58244 stopped
> > * thread #1: tid = 103132, 0x00000000004023f1 ls`main(argc=1,
> > argv=0x00007fffffffe598) + 33 at ls.c:163, stop reason = breakpoint
> > 1.1
> >    frame #0: 0x00000000004023f1 ls`main(argc=1,
> > argv=0x00007fffffffe598) + 33 at ls.c:163
> >   160  #ifdef COLORLS
> >   161          char termcapbuf[1024];  /* termcap definition buffer */
> >   162          char tcapbuf[512];      /* capability buffer */
> > -> 163          char *bp = tcapbuf;
> >   164  #endif
> >   165
> >   166          (void)setlocale(LC_ALL, "");
> > step
> > Process 58244 stopped
> > * thread #1: tid = 103132, 0x00000000004023fa ls`main(argc=1,
> > argv=0x00007fffffffe598) + 42 at ls.c:166, stop reason = step in
> >    frame #0: 0x00000000004023fa ls`main(argc=1,
> > argv=0x00007fffffffe598) + 42 at ls.c:166
> >   163          char *bp = tcapbuf;
> >   164  #endif
> >   165
> > -> 166          (void)setlocale(LC_ALL, "");
> >   167
> >   168          /* Terminal defaults to -Cq, non-terminal defaults to -1.
> */
> >   169          if (isatty(STDOUT_FILENO)) {
> > (lldb) step
> > Process 58244 stopped
> > * thread #1: tid = 103132, 0x0000000800dab011
> > libc.so.7`setlocale(category=0, locale=0x0000000000406373) + 33 at
> > setlocale.c:113, stop reason = step in
> >    frame #0: 0x0000000800dab011 libc.so.7`setlocale(category=0,
> > locale=0x0000000000406373) + 33 at setlocale.c:113
> >   110                  return (NULL);
> >   111          }
> >   112
> > -> 113          if (locale == NULL)
> >   114                  return (category != LC_ALL ?
> >   115                      current_categories[category] :
> currentlocale());
> >   116
> > (lldb) step
> > (lldb) Process 58244 stopped
> > * thread #1: tid = 103132, 0x0000000800dab01a
> > libc.so.7`setlocale(category=0, locale=0x0000000000406373) + 42 at
> > setlocale.c:121, stop reason = step in
> >    frame #0: 0x0000000800dab01a libc.so.7`setlocale(category=0,
> > locale=0x0000000000406373) + 42 at setlocale.c:121
> >   118           * Default to the current locale for everything.
> >   119           */
> >   120          for (i = 1; i < _LC_LAST; ++i)
> > -> 121                  (void)strcpy(new_categories[i],
> current_categories[i]);
> >   122
> >   123          /*
> >   124           * Now go fill up new_categories from the locale argument
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150406/b20ebdd3/attachment.html>


More information about the lldb-dev mailing list