From 56c7a19d41305946207f750c5ce3a37401ae979e Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 23 Feb 2015 20:18:37 +0000 Subject: [PATCH] Remove EOL whitespace from PlatformLinux This reduces the noise when diffing PlatformFreeBSD and PlatformLinux. llvm-svn: 230251 --- .../Plugins/Platform/Linux/PlatformLinux.cpp | 42 +++++++++++----------- lldb/source/Plugins/Platform/Linux/PlatformLinux.h | 6 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp index 89f101e..2b0a5ba 100644 --- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp +++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -172,14 +172,14 @@ PlatformLinux::CreateInstance (bool force, const ArchSpec *arch) default: break; } - + if (create) { switch (triple.getOS()) { case llvm::Triple::Linux: break; - + #if defined(__linux__) // Only accept "unknown" for the OS if the host is linux and // it "unknown" wasn't specified (it was just returned because it @@ -282,7 +282,7 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, char exe_path[PATH_MAX]; ModuleSpec resolved_module_spec (ms); - + if (IsHost()) { // If we have "ls" as the exe_file, resolve the executable location based on @@ -314,7 +314,7 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, else { // We may connect to a process and use the provided executable (Don't use local $PATH). - + if (resolved_module_spec.GetFileSpec().Exists()) error.Clear(); else @@ -327,8 +327,8 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, if (resolved_module_spec.GetArchitecture().IsValid()) { error = ModuleList::GetSharedModule (resolved_module_spec, - exe_module_sp, - NULL, + exe_module_sp, + NULL, NULL, NULL); if (error.Fail()) @@ -348,14 +348,14 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, module_triple.setOSName (host_triple.getOSName()); error = ModuleList::GetSharedModule (resolved_module_spec, - exe_module_sp, - NULL, + exe_module_sp, + NULL, NULL, NULL); } } - - // TODO find out why exe_module_sp might be NULL + + // TODO find out why exe_module_sp might be NULL if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL) { exe_module_sp.reset(); @@ -373,11 +373,11 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, for (uint32_t idx = 0; GetSupportedArchitectureAtIndex (idx, resolved_module_spec.GetArchitecture()); ++idx) { error = ModuleList::GetSharedModule (resolved_module_spec, - exe_module_sp, - NULL, + exe_module_sp, + NULL, NULL, NULL); - // Did we find an executable using one of the + // Did we find an executable using one of the if (error.Success()) { if (exe_module_sp && exe_module_sp->GetObjectFile()) @@ -385,12 +385,12 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, else error.SetErrorToGenericError(); } - + if (idx > 0) arch_names.PutCString (", "); arch_names.PutCString (resolved_module_spec.GetArchitecture().GetArchitectureName()); } - + if (error.Fail() || !exe_module_sp) { if (resolved_module_spec.GetFileSpec().Readable()) @@ -412,7 +412,7 @@ PlatformLinux::ResolveExecutable (const ModuleSpec &ms, } Error -PlatformLinux::GetFileWithUUID (const FileSpec &platform_file, +PlatformLinux::GetFileWithUUID (const FileSpec &platform_file, const UUID *uuid_ptr, FileSpec &local_file) { if (IsRemote()) @@ -455,7 +455,7 @@ PlatformLinux::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_inf } else { - if (m_remote_platform_sp) + if (m_remote_platform_sp) success = m_remote_platform_sp->GetProcessInfo (pid, process_info); } return success; @@ -525,7 +525,7 @@ PlatformLinux::GetStatus (Stream &strm) } size_t -PlatformLinux::GetSoftwareBreakpointTrapOpcode (Target &target, +PlatformLinux::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) { ArchSpec arch = target.GetArchitecture(); @@ -537,7 +537,7 @@ PlatformLinux::GetSoftwareBreakpointTrapOpcode (Target &target, default: assert(false && "CPU type not supported!"); break; - + case llvm::Triple::aarch64: { static const uint8_t g_aarch64_opcode[] = { 0x00, 0x00, 0x20, 0xd4 }; @@ -573,8 +573,8 @@ PlatformLinux::GetSoftwareBreakpointTrapOpcode (Target &target, if (bp_loc_sp) addr_class = bp_loc_sp->GetAddress ().GetAddressClass (); - if (addr_class == eAddressClassCodeAlternateISA - || (addr_class == eAddressClassUnknown + if (addr_class == eAddressClassCodeAlternateISA + || (addr_class == eAddressClassUnknown && bp_loc_sp->GetAddress().GetOffset() & 1)) { trap_opcode = g_thumb_breakpoint_opcode; diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h index eca2eae..c9140b4 100644 --- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.h +++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.h @@ -30,7 +30,7 @@ namespace lldb_private { static void Terminate (); - + PlatformLinux (bool is_host); virtual @@ -50,7 +50,7 @@ namespace lldb_private { lldb_private::ConstString GetPluginName() override; - + uint32_t GetPluginVersion() override { @@ -89,7 +89,7 @@ namespace lldb_private { GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch) override; size_t - GetSoftwareBreakpointTrapOpcode (Target &target, + GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site) override; int32_t -- 2.7.4