[Lldb-commits] [lldb] r230919 - Linux - debugging of local processes via lldb-gdbserver

Vince Harron vharron at google.com
Sun Mar 1 15:47:21 PST 2015


Hi all,

I ran the tests 100 times to compare before/after enabling LLGS Local.
Below you will see failure counts for each test.

There is some forward movement and some backward movement.  I think a lot
of the increased failures are just race conditions that already exist that
are just bein exacerbated as a result of timing changes.

We are going to XFAIL these tests as necessary and work very hard to
resolve remaining race conditions.

Local Linux (old)
     26 TestAttachResume
      2 TestChangeValueAPI
      2 TestFormats
      5 TestMiData
    100 TestMiExec
    100 TestMiInterpreterExec
      1 TestMiSignal
    100 TestMiStack
      1 TestMiSymbol
      1 TestMiSyntax
     16 TestProcessAttach
     20 TestProcessIO
     39 TestRegisters

LLGS Local (new)
      6 TestChangeValueAPI
      2 TestConcurrentEvents
      1 TestCreateAfterAttach
     34 TestFormats
    100 TestMiExec
    100 TestMiInterpreterExec
     45 TestMiSignal
    100 TestMiStack
     17 TestProcessIO
     10 TestSetWatchlocation
      1 TestSignalsAPI
     11 TestTargetWatchAddress
      6 TestThreadSpecificBreakpoint


On Sun, Mar 1, 2015 at 6:21 PM, Vince Harron <vharron at google.com> wrote:

> Author: vharron
> Date: Sun Mar  1 17:21:29 2015
> New Revision: 230919
>
> URL: http://llvm.org/viewvc/llvm-project?rev=230919&view=rev
> Log:
> Linux - debugging of local processes via lldb-gdbserver
>
> Instead of lldb calling the ptrace APIs directly, it launches an llgs
> instance and communicates with it via the remote debug protocol.
>
> This has two advantages.
>
> There is more code shared between the remote debugging code path
> and the local debugging code path. If a feature works in remote, it
> probably works locally and vice-versa.
>
> It makes us more architecturally similar to OSX (which also does
> local debugging via a connection to debugserver).
>
> This path is called LLGS local. We think that this configuration is
> now at parity with (or better than) local linux debugging.
>
> It is currently invoked if you have an environment variable defined
> "PLATFORM_LINUX_FORCE_LLGS_LOCAL"
>
> We would like to switch to LLGS local as the default path and only
> use the non-LLGS path if someone has an environment variable defined
> "PLATFORM_LINUX_DISABLE_LLGS_LOCAL"
>
> Later, if all goes well, we would like to remove non-LLGS local
> debugging support to simplify the codebase and avoid confusion.
>
>
> Modified:
>     lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
>     lldb/trunk/test/lldbtest.py
>
> Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=230919&r1=230918&r2=230919&view=diff
>
> ==============================================================================
> --- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
> +++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Sun Mar  1
> 17:21:29 2015
> @@ -64,13 +64,13 @@ namespace
>          static PropertyDefinition
>          g_properties[] =
>          {
> -            { "use-llgs-for-local" , OptionValue::eTypeBoolean, true,
> false, NULL, NULL, "Control whether the platform uses llgs for local debug
> sessions." },
> +            { "use-llgs-for-local" , OptionValue::eTypeBoolean, true,
> true, NULL, NULL, "Control whether the platform uses llgs for local debug
> sessions." },
>              {  NULL        , OptionValue::eTypeInvalid, false, 0  , NULL,
> NULL, NULL  }
>          };
>
> -        // Allow environment variable to force using llgs-local.
> -        if (getenv("PLATFORM_LINUX_FORCE_LLGS_LOCAL"))
> -            g_properties[ePropertyUseLlgsForLocal].default_uint_value =
> true;
> +        // Allow environment variable to disable llgs-local.
> +        if (getenv("PLATFORM_LINUX_DISABLE_LLGS_LOCAL"))
> +            g_properties[ePropertyUseLlgsForLocal].default_uint_value =
> false;
>
>          return g_properties;
>      }
>
> Modified: lldb/trunk/test/lldbtest.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=230919&r1=230918&r2=230919&view=diff
>
> ==============================================================================
> --- lldb/trunk/test/lldbtest.py (original)
> +++ lldb/trunk/test/lldbtest.py Sun Mar  1 17:21:29 2015
> @@ -595,7 +595,11 @@ def expectedFailureWindows(bugnumber=Non
>
>  def expectedFailureLLGS(bugnumber=None, compilers=None):
>      def fn(self):
> -        return 'PLATFORM_LINUX_FORCE_LLGS_LOCAL' in os.environ and
> self.expectedCompiler(compilers)
> +        # llgs local is only an option on Linux systems
> +        if 'linux' not in sys.platform:
> +            return False
> +        self.runCmd('settings show
> platform.plugin.linux.use-llgs-for-local')
> +        return 'true' in self.res.GetOutput() and
> self.expectedCompiler(compilers)
>      if bugnumber: return expectedFailure(fn, bugnumber)
>
>  def skipIfRemote(func):
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>



-- 

Vince Harron | Technical Lead Manager | vharron at google.com | 858-442-0868
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150301/d398bd1c/attachment.html>


More information about the lldb-commits mailing list