[Lldb-commits] [PATCH] Sync FreeBSD files to Linux equivalents, to reduce noise in diff

Malea, Daniel daniel.malea at intel.com
Fri Jun 21 08:56:26 PDT 2013


Looks all good to me!

On 2013-06-19 11:02 AM, "Ed Maste" <emaste at freebsd.org> wrote:

>- Sort functions in the same order
>- Match whitespace
>- Remove commetned out code
>- Make filename in comments match filename
>---
> source/Host/freebsd/Host.cpp                       | 10 +++---
> source/Plugins/Platform/FreeBSD/Makefile           |  2 +-
> .../Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp   |  5 +--
> source/Plugins/Process/FreeBSD/ProcessMonitor.cpp  | 37
>+++++++++++-----------
> 4 files changed, 25 insertions(+), 29 deletions(-)
>
>diff --git a/source/Host/freebsd/Host.cpp b/source/Host/freebsd/Host.cpp
>index 12d8110..7be15e1 100644
>--- a/source/Host/freebsd/Host.cpp
>+++ b/source/Host/freebsd/Host.cpp
>@@ -121,8 +121,8 @@ Host::GetEnvironment (StringList &env)
> }
> 
> bool
>-Host::GetOSVersion(uint32_t &major,
>-                   uint32_t &minor,
>+Host::GetOSVersion(uint32_t &major,
>+                   uint32_t &minor,
>                    uint32_t &update)
> {
>     struct utsname un;
>@@ -193,7 +193,7 @@ GetFreeBSDProcessArgs (const ProcessInstanceInfoMatch
>*match_info_ptr,
>             {
>                 process_info.GetExecutableFile().SetFile(cstr, false);
> 
>-                if (!(match_info_ptr == NULL ||
>+                if (!(match_info_ptr == NULL ||
>                     NameMatches
>(process_info.GetExecutableFile().GetFilename().GetCString(),
>                                  match_info_ptr->GetNameMatchType(),
>                  
>match_info_ptr->GetProcessInfo().GetName())))
>@@ -218,7 +218,7 @@ GetFreeBSDProcessArgs (const ProcessInstanceInfoMatch
>*match_info_ptr,
>                         return true;
>                 }
>             }
>-        } 
>+        }
>     }
>     return false;
> }
>@@ -240,7 +240,7 @@ GetFreeBSDProcessUserAndGroup(ProcessInstanceInfo
>&process_info)
>     struct kinfo_proc proc_kinfo;
>     size_t proc_kinfo_size;
> 
>-    if (process_info.ProcessIDIsValid())
>+    if (process_info.ProcessIDIsValid())
>     {
>         int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID,
>             (int)process_info.GetProcessID() };
>diff --git a/source/Plugins/Platform/FreeBSD/Makefile
>b/source/Plugins/Platform/FreeBSD/Makefile
>index e396247..e5c25d8 100644
>--- a/source/Plugins/Platform/FreeBSD/Makefile
>+++ b/source/Plugins/Platform/FreeBSD/Makefile
>@@ -1,4 +1,4 @@
>-##===- source/Plugins/Platform/Linux/Makefile --------------*- Makefile
>-*-===##
>+##===- source/Plugins/Platform/FreeBSD/Makefile ------------*- Makefile
>-*-===##
> #
> #                     The LLVM Compiler Infrastructure
> #
>diff --git a/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
>b/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
>index 0c2c46f..dc09172 100644
>--- a/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
>+++ b/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
>@@ -168,7 +168,7 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec
>&exe_file,
> 
>     if (IsHost())
>     {
>-        // If we have "ls" as the exe_file, resolve the executable
>loation based on
>+        // If we have "ls" as the exe_file, resolve the executable
>location based on
>         // the current path variables
>         if (!resolved_exe_file.Exists())
>         {
>@@ -179,9 +179,6 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec
>&exe_file,
>         if (!resolved_exe_file.Exists())
>             resolved_exe_file.ResolveExecutableLocation ();
> 
>-        // Resolve any executable within a bundle on MacOSX
>-        //Host::ResolveExecutableInBundle (resolved_exe_file);
>-
>         if (resolved_exe_file.Exists())
>             error.Clear();
>         else
>diff --git a/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
>b/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
>index f31e6e9..de52c3b 100644
>--- a/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
>+++ b/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
>@@ -932,25 +932,25 @@ ProcessMonitor::Launch(LaunchArgs *args)
>         args->m_error.SetErrorToGenericError();
>         switch (WEXITSTATUS(status))
>         {
>-            case ePtraceFailed:
>+            case ePtraceFailed:
>                 args->m_error.SetErrorString("Child ptrace failed.");
>                 break;
>-            case eDupStdinFailed:
>+            case eDupStdinFailed:
>                 args->m_error.SetErrorString("Child open stdin failed.");
>                 break;
>-            case eDupStdoutFailed:
>+            case eDupStdoutFailed:
>                 args->m_error.SetErrorString("Child open stdout
>failed.");
>                 break;
>-            case eDupStderrFailed:
>+            case eDupStderrFailed:
>                 args->m_error.SetErrorString("Child open stderr
>failed.");
>                 break;
>             case eChdirFailed:
>                 args->m_error.SetErrorString("Child failed to set
>working directory.");
>                 break;
>-            case eExecFailed:
>+            case eExecFailed:
>                 args->m_error.SetErrorString("Child exec failed.");
>                 break;
>-            default:
>+            default:
>                 args->m_error.SetErrorString("Child returned unknown
>exit status.");
>                 break;
>         }
>@@ -1458,19 +1458,6 @@ ProcessMonitor::WriteRegisterValue(lldb::tid_t
>tid, unsigned offset,
> }
> 
> bool
>-ProcessMonitor::ReadRegisterSet(lldb::tid_t tid, void *buf, size_t
>buf_size, unsigned int regset)
>-{
>-    return false;
>-}
>-
>-bool
>-ProcessMonitor::WriteRegisterSet(lldb::tid_t tid, void *buf, size_t
>buf_size, unsigned int regset)
>-{
>-    return false;
>-}
>-
>-
>-bool
> ProcessMonitor::ReadGPR(lldb::tid_t tid, void *buf, size_t buf_size)
> {
>     bool result;
>@@ -1489,6 +1476,12 @@ ProcessMonitor::ReadFPR(lldb::tid_t tid, void
>*buf, size_t buf_size)
> }
> 
> bool
>+ProcessMonitor::ReadRegisterSet(lldb::tid_t tid, void *buf, size_t
>buf_size, unsigned int regset)
>+{
>+    return false;
>+}
>+
>+bool
> ProcessMonitor::WriteGPR(lldb::tid_t tid, void *buf, size_t buf_size)
> {
>     bool result;
>@@ -1507,6 +1500,12 @@ ProcessMonitor::WriteFPR(lldb::tid_t tid, void
>*buf, size_t buf_size)
> }
> 
> bool
>+ProcessMonitor::WriteRegisterSet(lldb::tid_t tid, void *buf, size_t
>buf_size, unsigned int regset)
>+{
>+    return false;
>+}
>+
>+bool
> ProcessMonitor::Resume(lldb::tid_t tid, uint32_t signo)
> {
>     bool result;
>-- 
>1.7.11.5
>
>_______________________________________________
>lldb-commits mailing list
>lldb-commits at cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits





More information about the lldb-commits mailing list