[lldb-dev] How to debug LLDB server?

Bruce Mitchener via lldb-dev lldb-dev at lists.llvm.org
Wed Oct 7 20:03:32 PDT 2015


In the LLDB project, you have 3 different defines:

LLDB_CONFIGURATION_DEBUG
LLDB_CONFIGURATION_RELEASE
LLDB_CONFIGURATION_BUILD_AND_INTEGRATION

I can easily set this up to be set for the various build types in cmake,
but I'd like to make sure we all agree about what should happen first:

CMAKE_BUILD_TYPE = Debug: Add LLDB_CONFIGURATION_DEBUG
CMAKE_BUILD_TYPE = RelWithDebinfo: Add LLDB_CONFIGURATION_RELEASE
CMAKE_BUILD_TYPE = Release: Add LLDB_CONFIGURATION_BUILD_AND_INTEGRATION

This seems right to me as there are some usages of
LLDB_CONFIGURATION_RELEASE that appear to be useful with debugging.

Does that seem to be correct?

 - Bruce


On Thu, Oct 8, 2015 at 2:44 AM, Greg Clayton via lldb-dev <
lldb-dev at lists.llvm.org> wrote:

> We set this manually in the Xcode project for "Debug" and "DebugClang"
> build variants. The cmake should be able to do the same, but I am not sure
> if it is. Feel free to make it do so. I am not very good with cmake, so I
> won't be much help.
>
> Greg
>
> > On Oct 7, 2015, at 11:09 AM, Eugene Birukov <eugenebi at hotmail.com>
> wrote:
> >
> > Thanks!
> >
> > A newbie question then: how to trigger LLDB_CONFIGURATION_DEBUG when I
> run cmake? I am sure that I built debug version, but packet timeout is
> still 1 to me.
> >
> > (gdb) p m_packet_timeout
> > $1 = 1
> >
> >
> > > Subject: Re: [lldb-dev] How to debug LLDB server?
> > > From: gclayton at apple.com
> > > Date: Wed, 7 Oct 2015 11:04:45 -0700
> > > CC: lldb-dev at lists.llvm.org
> > > To: eugenebi at hotmail.com
> > >
> > > Most calls for lldb-server should use an instance variable
> GDBRemoteCommunication::m_packet_timeout which you could then modify. But
> this timeout you are talking about is the time that the expression can take
> when running. I would just bump these up temporarily while you are
> debugging to avoid the timeouts. Just don't check it in.
> > >
> > > So for GDB Remote packets, we already bump the timeout up in the
> GDBRemoteCommunication constructor:
> > >
> > > #ifdef LLDB_CONFIGURATION_DEBUG
> > > m_packet_timeout (1000),
> > > #else
> > > m_packet_timeout (1),
> > > #endif
> > >
> > >
> > > Anything else is probably expression timeouts and you will need to
> manually bump those up in order to debug, or you could do the same thing as
> the GDB Remote in InferiorCallPOSIX.cpp:
> > >
> > > #ifdef LLDB_CONFIGURATION_DEBUG
> > > options.SetTimeoutUsec(50000000);
> > > #else
> > > options.SetTimeoutUsec(500000);
> > > #endif
> > >
> > >
> > > > On Oct 7, 2015, at 10:33 AM, Eugene Birukov via lldb-dev <
> lldb-dev at lists.llvm.org> wrote:
> > > >
> > > > Hello,
> > > >
> > > > I am trying to see what is going inside LLDB server 3.7.0 but there
> are a lot of timeouts scattered everywhere. Say, InferiorCallPOSIX.cpp:74
> sets hard-coded timeout to 500,000us, etc. These timeouts fire if I spend
> any time on breakpoint inside server and make debugging experience
> miserable. Is there any way to turn them all off?
> > > >
> > > > BTW, I am using LLDB as a C++ API, not as standalone program, but I
> have debugger attached to it and can alter its memory state.
> > > >
> > > > Thanks,
> > > > Eugene
> > > >
> > > > _______________________________________________
> > > > lldb-dev mailing list
> > > > lldb-dev at lists.llvm.org
> > > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> > >
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151008/ea8d336f/attachment.html>


More information about the lldb-dev mailing list