summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/Linux
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-06-24 14:43:20 +0000
committerPavel Labath <labath@google.com>2015-06-24 14:43:20 +0000
commitb36f9178548d3c6ef6d6f89187e5307ec434f7fc (patch)
tree6617ba85693c76533574d1471db9c2687f2653e6 /lldb/source/Plugins/Platform/Linux
parent51aa1f86fbd7580309ffa4f3d9579e7c6f1f470c (diff)
downloadbcm5719-llvm-b36f9178548d3c6ef6d6f89187e5307ec434f7fc.tar.gz
bcm5719-llvm-b36f9178548d3c6ef6d6f89187e5307ec434f7fc.zip
Remove old local-only linux debugging code
Summary: Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using it; and b) the remote debugging path is much more stable. This commit removes the local-only linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new architecture as well and then this code can be removed completely. Test Plan: Test suite passes via remote stub. Reviewers: emaste, vharron, ovyalov, clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10661 llvm-svn: 240543
Diffstat (limited to 'lldb/source/Plugins/Platform/Linux')
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp40
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.h3
2 files changed, 1 insertions, 42 deletions
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index e656f7a3eca..2893a2425da 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -57,11 +57,6 @@ static uint32_t g_initialize_count = 0;
namespace
{
- enum
- {
- ePropertyUseLlgsForLocal = 0,
- };
-
class PlatformLinuxProperties : public Properties
{
public:
@@ -73,9 +68,6 @@ namespace
virtual
~PlatformLinuxProperties() = default;
- bool
- GetUseLlgsForLocal() const;
-
private:
static const PropertyDefinition*
GetStaticPropertyDefinitions();
@@ -99,27 +91,15 @@ PlatformLinuxProperties::GetSettingName ()
return g_setting_name;
}
-bool
-PlatformLinuxProperties::GetUseLlgsForLocal() const
-{
- const uint32_t idx = ePropertyUseLlgsForLocal;
- return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, GetStaticPropertyDefinitions()[idx].default_uint_value != 0);
-}
-
const PropertyDefinition*
PlatformLinuxProperties::GetStaticPropertyDefinitions()
{
static PropertyDefinition
g_properties[] =
{
- { "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 disable llgs-local.
- if (getenv("PLATFORM_LINUX_DISABLE_LLGS_LOCAL"))
- g_properties[ePropertyUseLlgsForLocal].default_uint_value = false;
-
return g_properties;
}
@@ -678,21 +658,11 @@ PlatformLinux::GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info)
}
bool
-PlatformLinux::UseLlgsForLocalDebugging ()
-{
- PlatformLinuxPropertiesSP properties_sp = GetGlobalProperties ();
- assert (properties_sp && "global properties shared pointer is null");
- return properties_sp ? properties_sp->GetUseLlgsForLocal () : false;
-}
-
-bool
PlatformLinux::CanDebugProcess ()
{
if (IsHost ())
{
- // The platform only does local debugging (i.e. uses llgs) when the setting indicates we do that.
- // Otherwise, we'll use ProcessLinux/ProcessPOSIX to handle with ProcessMonitor.
- return UseLlgsForLocalDebugging ();
+ return true;
}
else
{
@@ -724,14 +694,6 @@ PlatformLinux::DebugProcess (ProcessLaunchInfo &launch_info,
ProcessSP process_sp;
- // Ensure we're using llgs for local debugging.
- if (!UseLlgsForLocalDebugging ())
- {
- assert (false && "we're trying to debug a local process but platform.plugin.linux.use-llgs-for-local is false, should never get here");
- error.SetErrorString ("attempted to start gdb-remote-based debugging for local process but platform.plugin.linux.use-llgs-for-local is false");
- return process_sp;
- }
-
// Make sure we stop at the entry point
launch_info.GetFlags ().Set (eLaunchFlagDebug);
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
index 4caf5352ad7..3a2f90d79a3 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
@@ -122,9 +122,6 @@ namespace platform_linux {
uint64_t
ConvertMmapFlagsToPlatform(unsigned flags) override;
- static bool
- UseLlgsForLocalDebugging ();
-
private:
DISALLOW_COPY_AND_ASSIGN (PlatformLinux);
};
OpenPOWER on IntegriCloud