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

Ed Maste emaste at freebsd.org
Mon Apr 6 14:03:23 PDT 2015


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



More information about the lldb-dev mailing list