[lldb-dev] Bug in tools/debugserver/source/RNBRemote.cpp

William Lynch wlynch at wlynch.cx
Wed Jul 21 10:34:23 PDT 2010


Hi,

Just as a preface, I've been attempting to get the codebase running under
leopard and / or Linux. In the process, I've been using the makefiles. I've
gotten to the point where I can run lldb under Leopard, but I can't debug
any programs because debugserver won't build yet. While fixing small
warnings / errors in the code base, I came across this piece of code at *line
422* in *tools/debugserver/source/RNBRemote.cpp*:

The set of two while loops is not standard C and this looks alot like a
deadlock possibility. I don't know enough right now to fix this however.

Enjoy,
Bill Lynch

        while ((set_events = events.WaitForSetEvents(events_to_wait_for)) !=
0)
        {
            if (set_events & RNBContext::event_read_packet_available)
            {
                // Try the queue again now that we got an event
                err = GetPacketPayload (payload);
                if (err == rnb_success)
                    break;
            }

            if (set_events & RNBContext::event_read_thread_exiting)
                err = rnb_not_connected;

            if (err == rnb_not_connected)
                return err;

        } while (err == rnb_err);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20100721/c4270baa/attachment.html>


More information about the lldb-dev mailing list