Hi,

Not sure if I'm the only one noticing this: after playing around a bit with
the lldb command line, the typed characters and the prompt are no longer
displayed. This is happening intermittently but it's annoying.

Attached a patch that fixes this. Not a proper fix though, more like a work
around: the "(lldb)" prompt is sometimes further away from index 0, usually
having a newline character just before it. The work around was to find the
prompt within all the string, not only at position 0. Not sure why
the prompt has that extra newline though... I wounder how this affects Mac
OS.

Thanks,
Dragos
Index: IOChannel.cpp
===================================================================
--- IOChannel.cpp	(revision 143348)
+++ IOChannel.cpp	(working copy)
@@ -274,8 +274,9 @@
     if (io_channel->IsGettingCommand() && io_channel->m_expecting_prompt)
     {
         io_channel->m_prompt_str.append (bytes, src_len);
-		// Log this to make sure the prompt is really what you think it is.
-        if (io_channel->m_prompt_str.find (el_prompt(io_channel->m_edit_line)) == 0)
+        // Log this to make sure the prompt is really what you think it is.
+        if (io_channel->m_prompt_str.find (el_prompt(io_channel->m_edit_line))
+                                                            != std::string::npos)
         {
             io_channel->m_expecting_prompt = false;
             io_channel->m_refresh_request_pending = false;
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to