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

Greg Clayton gclayton at apple.com
Thu Apr 9 17:06:41 PDT 2015


Note that my "io2.patch" removed the fix that was introduced with 234517. So it works without that fix which is good news. 

When sourcing files we turn off output for many things. Try your commands as:

% ~/Documents/src/lldb/tot/build/Debug/lldb -o 'file d:\testexe\simple_step.exe' -o 'break set -f simple_step.cpp -l 12' -o run -o bt

The attached patch always uses the debugger output and error instead of the output and error from the current IOHandler. This shouldn't make a change, but it is the change I would want to submit.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: io3.patch
Type: application/octet-stream
Size: 27230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150409/de1a0661/attachment.obj>
-------------- next part --------------


Please test this as much as you can and let me know if this fixes all your prompt issues (besides stuff not showing up when run in non-interactive mode by sourcing a commands file).

Greg

> On Apr 9, 2015, at 4:44 PM, Zachary Turner <zturner at google.com> wrote:
> 
> So my double prompt seems to be fixed, but then I reverted your change and noticed it was still fixed.  So I looked through the history a little bit, and it appears to have been fixed by r234517.  I still don't see the output of "bt" printed when it's run from my inside my .lldbinit file.  But since r234517 fixed my double prompt, I must be having the same problem described in the commit message, which is that I don't have an IOHandler on my process.  So maybe addressing that will fix my backtrace as well.
> 
> Either way, if anyone else tries this patch and also notices that the problem is fixed, please also check whether it is fixed by 234517 without this patch so that we are sure what exactly is causing people's problems to go away.
> 
> On Thu, Apr 9, 2015 at 4:05 PM Greg Clayton <gclayton at apple.com> wrote:
> Try this one out and let me know if anything improves?
> 
> 
> 
> 
> > On Apr 9, 2015, at 11:23 AM, Zachary Turner <zturner at google.com> wrote:
> >
> > If you need a VM or something let me know I can proabbly make something that you can remote into and is already properly set up and ready to build.
> >
> > On Thu, Apr 9, 2015 at 11:02 AM Greg Clayton <gclayton at apple.com> wrote:
> > Thanks everyone for trying this out. I will modify this patch and try again soon.
> >
> > > On Apr 9, 2015, at 7:56 AM, Pavel Labath <labath at google.com> wrote:
> > >
> > > The situation is even worse on Linux, i'm afraid. Whereas I was
> > > getting no wrong prompts before (at least when debugging locally), now
> > > the prompt appears in the wrong place in about 10% of the cases.
> > >
> > > pl
> > >
> > > On 9 April 2015 at 15:19, Ed Maste <emaste at freebsd.org> wrote:
> > >> On 8 April 2015 at 16:35, Greg Clayton <gclayton at apple.com> wrote:
> > >>>
> > >>> This one removes the m_iohandler_sync completely and coordinates async IO with the IOHandlers. Let me know if this works any better for freebsd, linux or windows.
> > >>
> > >> Problem persists with this version on FreeBSD, unfortunately:
> > >>
> > >> ...
> > >>   165
> > >>   166          (void)setlocale(LC_ALL, "");
> > >> (lldb) step
> > >> (lldb) Process 77191 stopped
> > >> * thread #1: tid = 100853, 0x00000000004023fa ls`main(argc=1,
> > >> argv=0x00007fffffffe588) + 42 at ls.c:166, stop reason = step in
> > >>    frame #0: 0x00000000004023fa ls`main(argc=1,
> > >> argv=0x00007fffffffe588) + 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)) {
> > >> step
> > >> ...
> > >> _______________________________________________
> > >> lldb-dev mailing list
> > >> lldb-dev at cs.uiuc.edu
> > >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> >
> >
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> 



More information about the lldb-dev mailing list