[lldb-dev] PATCH for REVIEW: Implement Host::SetThreadName on Linux
Yacine Belkadi
yacine.belkadi.1 at gmail.com
Mon May 13 14:54:07 PDT 2013
Hi,
On 13/05/2013 18:43, Greg Clayton wrote:
> [...]
>
> The libedit code in the "lldb" binary seems to be a bit flaky on linux.
> Sometimes the (lldb) prompt does't show up and other times the newlines
> after entered commands come out in the command output. Anything that can
> be done to solidify the libedit based code on linux would be a great help.
>
I think one of the causes for the libedit related issues is that the libedit
package on Debian/Ubuntu is quite old (2.11-20080614-5). It looks like a
snapshot of NetBSD's version on 2008-06-14 with some Debian/Ubuntu patches.
For example, for the "(llbd) prompt" bug, I noticed that both lldb and the
python interpreter call into libedit, but the library doesn't seem to
support it. This was apparently fixed in NetBSD's code
(http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/Attic/term.c?rev=1.47&content-type=text/x-cvsweb-markup&sortby=date).
Another example is that the libedit's el_gets() doesn't distinguish
between an error and an EOF:
"Returns the line read if successful, or NULL if characters were read or if
an error occurred."
This doesn't help for detecting a CTRL-D (meaning "quit") from the user.
Looking at NetBSD's man page for editline, this has been fixed in later
versions:
"If an error occurred, count is set to -1 and errno contains the error code
that caused it."
In both cases, a more recent libedit would have helped.
Yacine
More information about the lldb-dev
mailing list