pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lldb-netbsd: Reduce diff in PlatformNetBSD::GetStatus with Linux



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Dec 19 19:11:28 2016 +0100
Changeset:	7532cb79202aa44b28b89b5eaad6beab2d8e26e7

Modified Files:
	lldb-netbsd/distinfo
	lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp

Log Message:
lldb-netbsd: Reduce diff in PlatformNetBSD::GetStatus with Linux

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7532cb79202aa44b28b89b5eaad6beab2d8e26e7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lldb-netbsd/distinfo                               |  2 +-
 ...urce_Plugins_Platform_NetBSD_PlatformNetBSD.cpp | 44 +++++++++++++++++++++-
 2 files changed, 43 insertions(+), 3 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index c6dab6d..7fc9645 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -22,7 +22,7 @@ SHA1 (patch-source_Host_netbsd_HostThreadNetBSD.cpp) = a1b0fbdad062309a845cfefe4
 SHA1 (patch-source_Host_netbsd_ProcessLauncherNetBSD.cpp) = 8b36c0b8d5c75ce501e4848ca07392a7aab68877
 SHA1 (patch-source_Host_netbsd_ThisThread.cpp) = f0d32c81bc1b8fe9aeb86519ea46ba2cb16571c2
 SHA1 (patch-source_Initialization_SystemInitializerCommon.cpp) = b8a2f94eb71dbd265701fdd62e3d36bc0d7081f1
-SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp) = 9f5b3dec50a85905622fabc4551eb0dab3ef6b3b
+SHA1 (patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp) = 55749f5b66f412ae0f09e7c24a539b5008eac6a4
 SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c0168f81da56d9896eb414e6b8bb7262de04ac33
 SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = df17afdf71c29d945c887e318718904793cd48ad
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = f83c6cdb1c66713707e723a342ddfd864048ddba
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
index a6f9574..def0b9c 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Platform_NetBSD_PlatformNetBSD.cpp
@@ -167,12 +167,12 @@ $NetBSD$
 +            module_triple.setVendorName(host_triple.getVendorName());
 +          if (!is_os_specified)
 +            module_triple.setOSName(host_triple.getOSName());
-+
+ 
 +          error = ModuleList::GetSharedModule(resolved_module_spec,
 +                                              exe_module_sp, NULL, NULL, NULL);
 +        }
 +      }
- 
++
 +      // TODO find out why exe_module_sp might be NULL
        if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL) {
          exe_module_sp.reset();
@@ -200,3 +200,43 @@ $NetBSD$
    if (IsRemote()) {
      if (m_remote_platform_sp)
        return m_remote_platform_sp->GetFileWithUUID(platform_file, uuid_ptr,
+@@ -471,27 +521,23 @@ bool PlatformNetBSD::GetSupportedArchite
+ }
+ 
+ void PlatformNetBSD::GetStatus(Stream &strm) {
++  Platform::GetStatus(strm);
++
+ #ifndef LLDB_DISABLE_POSIX
+-  struct ::utsname un;
++  // Display local kernel information only when we are running in host mode.
++  // Otherwise, we would end up printing non-Linux information (when running
++  // on Mac OS for example).
++  if (IsHost()) {
++    struct utsname un;
+ 
+-  strm << "      Host: ";
++    if (uname(&un))
++      return;
+ 
+-  ::memset(&un, 0, sizeof(utsname));
+-  if (::uname(&un) == -1) {
+-    strm << "NetBSD" << '\n';
+-  } else {
+-    strm << un.sysname << ' ' << un.release;
+-    if (un.nodename[0] != '\0')
+-      strm << " (" << un.nodename << ')';
+-    strm << '\n';
+-
+-    // Dump a common information about the platform status.
+-    strm << "Host: " << un.sysname << ' ' << un.release << ' ' << un.version
+-         << '\n';
++    strm.Printf("    Kernel: %s\n", un.sysname);
++    strm.Printf("   Release: %s\n", un.release);
++    strm.Printf("   Version: %s\n", un.version);
+   }
+ #endif
+-
+-  Platform::GetStatus(strm);
+ }
+ 
+ void PlatformNetBSD::CalculateTrapHandlerSymbolNames() {


Home | Main Index | Thread Index | Old Index