pkgsrc-WIP-changes archive

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

lldb-netbsd: Resurrect GetSoftwareBreakpointTrapOpcode on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Mar 2 10:37:16 2017 +0100
Changeset:	0a8847620c511ef596f0d6343ab9f66b1b3ee8bd

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

Log Message:
lldb-netbsd: Resurrect GetSoftwareBreakpointTrapOpcode on NetBSD

This code is restricted to i386 and amd64.

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=0a8847620c511ef596f0d6343ab9f66b1b3ee8bd

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

diffstat:
 lldb-netbsd/distinfo                                      |  2 +-
 ...-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index 651ec0542a..f484ae6494 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -23,7 +23,7 @@ SHA1 (patch-source_Host_netbsd_ThisThread.cpp) = f0d32c81bc1b8fe9aeb86519ea46ba2
 SHA1 (patch-source_Initialization_SystemInitializerCommon.cpp) = dc270227e68c655753ef5f5168e3fa9a8dab3696
 SHA1 (patch-source_Plugins_Process_CMakeLists.txt) = c689ff4ec455234f8d506dc9eb8e0ed7f750d426
 SHA1 (patch-source_Plugins_Process_NetBSD_CMakeLists.txt) = a77f397020ab752875813a7a93b53ccd3a130e6f
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 037094d3eaa832eaf2b3719833d2d3c46101e03e
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = 3c0831f5557cba5d1d69e3c8ea80432095dce6f9
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.h) = c48bb2dd45682164ab904b8b3f7664b91ac35d5b
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = b15ba9af606d18188dfac0e8ee39f88eae37e8f9
 SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = e27bbdced40cce10524ac00e91480d0d84195722
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
index 6f57016253..43ea4dbeaf 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp.orig	2017-02-28 07:44:53.246937953 +0000
 +++ source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
-@@ -0,0 +1,1288 @@
+@@ -0,0 +1,1299 @@
 +//===-- NativeProcessNetBSD.cpp -------------------------------- -*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -1090,7 +1090,18 @@ $NetBSD$
 +Error NativeProcessNetBSD::GetSoftwareBreakpointTrapOpcode(
 +    size_t trap_opcode_size_hint, size_t &actual_opcode_size,
 +    const uint8_t *&trap_opcode_bytes) {
-+  return Error();
++  static const uint8_t g_i386_opcode[] = {0xCC};
++
++  switch (m_arch.GetMachine()) {
++  case llvm::Triple::x86:
++  case llvm::Triple::x86_64:
++    trap_opcode_bytes = g_i386_opcode;
++    actual_opcode_size = sizeof(g_i386_opcode);
++    return Error();
++  default:
++    assert(false && "CPU type not supported!");
++    return Error("CPU type not supported");
++  }
 +}
 +
 +Error NativeProcessNetBSD::ReadMemory(lldb::addr_t addr, void *buf, size_t size,


Home | Main Index | Thread Index | Old Index