diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 | 
| commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
| tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Plugins/Platform/Windows/PlatformWindows.cpp | |
| parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) | |
Notes
Diffstat (limited to 'source/Plugins/Platform/Windows/PlatformWindows.cpp')
| -rw-r--r-- | source/Plugins/Platform/Windows/PlatformWindows.cpp | 32 | 
1 files changed, 15 insertions, 17 deletions
diff --git a/source/Plugins/Platform/Windows/PlatformWindows.cpp b/source/Plugins/Platform/Windows/PlatformWindows.cpp index 45e906f88e00..685d49a73a77 100644 --- a/source/Plugins/Platform/Windows/PlatformWindows.cpp +++ b/source/Plugins/Platform/Windows/PlatformWindows.cpp @@ -9,16 +9,12 @@  #include "PlatformWindows.h" -// C Includes  #include <stdio.h>  #if defined(_WIN32)  #include "lldb/Host/windows/windows.h"  #include <winsock2.h>  #endif -// C++ Includes -// Other libraries and framework includes -// Project includes  #include "lldb/Breakpoint/BreakpointLocation.h"  #include "lldb/Breakpoint/BreakpointSite.h"  #include "lldb/Core/Debugger.h" @@ -71,7 +67,7 @@ PlatformSP PlatformWindows::CreateInstance(bool force,    const bool is_host = false;    bool create = force; -  if (create == false && arch && arch->IsValid()) { +  if (!create && arch && arch->IsValid()) {      const llvm::Triple &triple = arch->GetTriple();      switch (triple.getVendor()) {      case llvm::Triple::PC: @@ -192,16 +188,18 @@ Status PlatformWindows::ResolveExecutable(    if (IsHost()) {      // if we cant resolve the executable loation based on the current path      // variables -    if (!resolved_module_spec.GetFileSpec().Exists()) { +    if (!FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec())) {        resolved_module_spec.GetFileSpec().GetPath(exe_path, sizeof(exe_path)); -      resolved_module_spec.GetFileSpec().SetFile(exe_path, true, +      resolved_module_spec.GetFileSpec().SetFile(exe_path,                                                   FileSpec::Style::native); +      FileSystem::Instance().Resolve(resolved_module_spec.GetFileSpec());      } -    if (!resolved_module_spec.GetFileSpec().Exists()) -      resolved_module_spec.GetFileSpec().ResolveExecutableLocation(); +    if (!FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec())) +      FileSystem::Instance().ResolveExecutableLocation( +          resolved_module_spec.GetFileSpec()); -    if (resolved_module_spec.GetFileSpec().Exists()) +    if (FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec()))        error.Clear();      else {        ms.GetFileSpec().GetPath(exe_path, sizeof(exe_path)); @@ -215,7 +213,7 @@ Status PlatformWindows::ResolveExecutable(      } else {        // We may connect to a process and use the provided executable (Don't use        // local $PATH). -      if (resolved_module_spec.GetFileSpec().Exists()) +      if (FileSystem::Instance().Exists(resolved_module_spec.GetFileSpec()))          error.Clear();        else          error.SetErrorStringWithFormat("the platform is not currently " @@ -262,7 +260,8 @@ Status PlatformWindows::ResolveExecutable(        }        if (error.Fail() || !exe_module_sp) { -        if (resolved_module_spec.GetFileSpec().Readable()) { +        if (FileSystem::Instance().Readable( +                resolved_module_spec.GetFileSpec())) {            error.SetErrorStringWithFormat(                "'%s' doesn't contain any '%s' platform architectures: %s",                resolved_module_spec.GetFileSpec().GetPath().c_str(), @@ -438,9 +437,8 @@ ProcessSP PlatformWindows::DebugProcess(ProcessLaunchInfo &launch_info,      ProcessAttachInfo attach_info(launch_info);      return Attach(attach_info, debugger, target, error);    } else { -    ProcessSP process_sp = -        target->CreateProcess(launch_info.GetListenerForProcess(debugger), -                              launch_info.GetProcessPluginName(), nullptr); +    ProcessSP process_sp = target->CreateProcess( +        launch_info.GetListener(), launch_info.GetProcessPluginName(), nullptr);      // We need to launch and attach to the process.      launch_info.GetFlags().Set(eLaunchFlagDebug); @@ -470,8 +468,8 @@ lldb::ProcessSP PlatformWindows::Attach(ProcessAttachInfo &attach_info,      FileSpec emptyFileSpec;      ArchSpec emptyArchSpec; -    error = debugger.GetTargetList().CreateTarget(debugger, "", "", false, -                                                  nullptr, new_target_sp); +    error = debugger.GetTargetList().CreateTarget( +        debugger, "", "", eLoadDependentsNo, nullptr, new_target_sp);      target = new_target_sp.get();    }  | 
