<html><head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">I've noticed this same bug
myself, and actually spent a while this week trying to fix it (with no
luck).<br>
<br>
The problem is simply a threading race condition, which manifests
sometimes. You can usually (on Linux at least) trigger it by just doing a
'run' repeatedly until it happens.<br>
<br>
It's because the process's input reader is created asynchronously on a
thread, so isn't guaranteed to be at the top of the input stack at the
time the 'run' command has finished. So the driver may or may not try to
refresh the prompt.<br>
<br>
I don't have a fix for this I'm afraid.<br>
<br>
Also, regarding the original problem, it sounds to me like you're trying
to capture the lldb output so you can build a debugger interface on top
(like GDB interfaces often work). For what it's worth, this is a really
bad idea. lldb has a C++ and Python API which are much better suited
for that kind of thing. <br>
<br>
-- <br>
Richard Mitton<br>
<a class="moz-txt-link-abbreviated" href="mailto:richard@codersnotes.com">richard@codersnotes.com</a><br>
<br>
<blockquote style="border: 0px none;"
cite="mid:1F6AA19A-2CAD-45CC-A730-FBFF99BB0AA8@apple.com" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="jingham@apple.com" photoname=""
src="cid:part1.00060300.02040805@codersnotes.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:jingham@apple.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">jingham@apple.com</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Friday, October
04, 2013 8:41 AM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>Did you launch the two
processes in the same way in both cases? It looks like in the first
instance lldb is running synchronously, and in the second instance
asynchronously. I sent a note to the list a couple of days ago
describing when lldb uses the two modes, check that and see if it
explains what you are seeing. Otherwise, this may be some bug in the
input driver?<br><br>Jim<br><br></div><div><!----><br><br>_______________________________________________<br>lldb-dev
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br><a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="yin@affinic.com" photoname="Yin Ma"
src="cid:part1.00060300.02040805@codersnotes.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:yin@affinic.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Yin Ma</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Thursday, October
03, 2013 11:30 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<meta content="Microsoft Word 12 (filtered medium)" name="Generator">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:143162851;
mso-list-type:hybrid;
mso-list-template-ids:-247719834 -295421478 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:宋体;
mso-bidi-font-family:"Times New Roman";}
@list l1
{mso-list-id:1463839947;
mso-list-type:hybrid;
mso-list-template-ids:1221649520 -1037403958 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:宋体;
mso-bidi-font-family:"Times New Roman";}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I got different behavior between run lldb under
regular
terminal<o:p></o:p></p>
<p class="MsoNormal">And GUI simulated terminal (posix_openpt or pipe
based).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the regular terminal:<o:p></o:p></p>
<p class="MsoNormal">(lldb) run<o:p></o:p></p>
<p class="MsoNormal">Process 10992 launched: ‘…’<o:p></o:p></p>
<p class="MsoNormal">Process 10992 stopped<o:p></o:p></p>
<p class="MsoNormal"> Thread …<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the GUI, If I run the same thing, I got<o:p></o:p></p>
<p class="MsoNormal">(lldb) run<o:p></o:p></p>
<p class="MsoNormal">Process 10992 launched: ‘…’<o:p></o:p></p>
<p class="MsoNormal">(lldb) Process 10992 stopped<o:p></o:p></p>
<p class="MsoNormal"> Thread …<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">There already is (lldb) after the first line.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My lldb is 179.5<o:p></o:p></p>
<p class="MsoNormal">Could anybody let me know why there is this
difference? <o:p></o:p></p>
<p class="MsoNormal">And How to switch to the regular mode?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Yin <o:p></o:p></p>
</div>
<div>_______________________________________________<br>lldb-dev mailing
list<br><a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br><a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br></div></div>
</blockquote>
</body></html>