diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo index faad2ccba9e..08a2474c37e 100644 --- a/lldb-netbsd/distinfo +++ b/lldb-netbsd/distinfo @@ -13,6 +13,7 @@ SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes SHA1 (patch-source_Plugins_ObjectFile_ELF_ObjectFileELF.cpp) = 6da890620fb393f202d2acc6402b96dbb0b82928 -SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = 90f9ce4bdbdfbfab2090b7296a00c66dacd126d6 +SHA1 (patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp) = 048ad92f569745ab363c8d19a8081812abc94ae6 +SHA1 (patch-source_Plugins_Process_elf-core_RegisterContextPOSIXCore__arm64.cpp) = e5d14323468130da799f4f44852ccddf6cbc62ee SHA1 (patch-source_Plugins_Process_elf-core_RegisterUtilities.h) = e1f3d5eb7b050e92f6d1d57ea31266eb3a8720ad SHA1 (patch-source_Plugins_Process_elf-core_ThreadElfCore.cpp) = 9ef247cde8681d060263ccd25d7128f7c7d38e30 diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp index 28e9921a541..c11a67fa6f5 100644 --- a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp +++ b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_ProcessElfCore.cpp @@ -52,7 +52,7 @@ } static void ParseOpenBSDProcInfo(ThreadData &thread_data, -@@ -550,35 +577,113 @@ llvm::Error ProcessElfCore::parseFreeBSD +@@ -550,35 +577,103 @@ llvm::Error ProcessElfCore::parseFreeBSD llvm::Error ProcessElfCore::parseNetBSDNotes(llvm::ArrayRef notes) { ThreadData thread_data; @@ -112,12 +112,7 @@ + m_thread_data.back().gpregset = note.data; + m_thread_data.back().tid = tid; + } else if (note.info.n_type == NETBSD::AMD64::NT_FPREGS) { -+#if notyet -+ if (m_thread_data.empty() || tid != m_thread_data.back().tid) -+ return Status("Error parsing NetBSD core(5) notes: Unexpected order " -+ "of NOTEs PT_GETFPREG before PT_GETREG").ToError(); -+ m_thread_data.back().fpregset = note.data; -+#endif ++ m_thread_data.back().notes.push_back(note); + } else { + return Status( + "Error parsing NetBSD core(5) notes: Unsupported AMD64 NOTE").ToError(); @@ -131,12 +126,7 @@ + m_thread_data.back().gpregset = note.data; + m_thread_data.back().tid = tid; + } else if (note.info.n_type == NETBSD::AARCH64::NT_FPREGS) { -+#if notyet -+ if (m_thread_data.empty() || tid != m_thread_data.back().tid) -+ return Status("Error parsing NetBSD core(5) notes: Unexpected order " -+ "of NOTEs PT_GETFPREG before PT_GETREG").ToError(); -+ m_thread_data.back().fpregset = note.data; -+#endif ++ m_thread_data.back().notes.push_back(note); // We need to implement an extractor of 128bit integers + } else { + return Status( + "Error parsing NetBSD core(5) notes: Unsupported EVBARM NOTE").ToError(); diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_RegisterContextPOSIXCore__arm64.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_RegisterContextPOSIXCore__arm64.cpp new file mode 100644 index 00000000000..117ad5bfd01 --- /dev/null +++ b/lldb-netbsd/patches/patch-source_Plugins_Process_elf-core_RegisterContextPOSIXCore__arm64.cpp @@ -0,0 +1,20 @@ +$NetBSD$ + +--- source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp.orig 2018-02-02 18:39:12.000000000 +0000 ++++ source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp +@@ -43,7 +43,14 @@ bool RegisterContextCorePOSIX_arm64::Wri + bool RegisterContextCorePOSIX_arm64::ReadRegister(const RegisterInfo *reg_info, + RegisterValue &value) { + lldb::offset_t offset = reg_info->byte_offset; +- uint64_t v = m_gpr.GetMaxU64(&offset, reg_info->byte_size); ++ uint64_t v; ++ ++ if (reg_info->byte_size == 16) { ++ v = m_gpr.GetMaxU64(&offset, 8); ++ v = m_gpr.GetMaxU64(&offset, 8); ++ } else { ++ v = m_gpr.GetMaxU64(&offset, reg_info->byte_size); ++ } + if (offset == reg_info->byte_offset + reg_info->byte_size) { + value = v; + return true;