pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lldb-netbsd: Fix build issues with watchpoints
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Tue Apr 11 14:30:38 2017 +0200
Changeset: ee89537750fd883be75af76b3a005730cba1bf56
Modified Files:
lldb-netbsd/distinfo
lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
Log Message:
lldb-netbsd: Fix build issues with watchpoints
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=ee89537750fd883be75af76b3a005730cba1bf56
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
lldb-netbsd/distinfo | 2 +-
...NetBSD_NativeRegisterContextNetBSD__x86__64.cpp | 39 +++++++++++++---------
2 files changed, 25 insertions(+), 16 deletions(-)
diffs:
diff --git a/lldb-netbsd/distinfo b/lldb-netbsd/distinfo
index ad9506ade2..8e384643ea 100644
--- a/lldb-netbsd/distinfo
+++ b/lldb-netbsd/distinfo
@@ -16,7 +16,7 @@ SHA1 (patch-source_Core_ArchSpec.cpp) = 1585f4ffa707bc69e96f7dd3b5137e00858ed7be
SHA1 (patch-source_Plugins_Process_NetBSD_NativeProcessNetBSD.cpp) = f20a1520d282f40c92408d3106a3bba1027e3069
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.cpp) = abeb0ceb532831404f692f2e25532f81f2a83163
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD.h) = 30ef94fb108271313ec61cf4d293fe5d9709948b
-SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = f17e4d86dde6d2bc93bbaf5529f079a3386ff7df
+SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp) = f1db97759b1e32cf328ba4573b314f7a823d5c52
SHA1 (patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.h) = e6f51be1b1a0d14242dffc971a71fb7b9e10fda8
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.cpp) = 6bcf4b7fafe63e74e5f6127d5dc816e95070e7c6
SHA1 (patch-source_Plugins_Process_NetBSD_NativeThreadNetBSD.h) = d2586e2ecdc2c979c59fc1a6a569e7870d3334ba
diff --git a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
index ca0c2ccf7f..0f1836748d 100644
--- a/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
+++ b/lldb-netbsd/patches/patch-source_Plugins_Process_NetBSD_NativeRegisterContextNetBSD__x86__64.cpp
@@ -2,6 +2,15 @@ $NetBSD$
--- source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp.orig 2017-03-30 22:14:30.000000000 +0000
+++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
+@@ -114,7 +114,7 @@ NativeRegisterContextNetBSD_x86_64::Nati
+ uint32_t concrete_frame_idx)
+ : NativeRegisterContextNetBSD(native_thread, concrete_frame_idx,
+ CreateRegisterInfoInterface(target_arch)),
+- m_gpr_x86_64() {}
++ m_gpr_x86_64(), m_fpr_x86_64(), m_dbr_x86_64() {}
+
+ // CONSIDER after local and llgs debugging are merged, register set support can
+ // be moved into a base x86-64 class with IsRegisterSetAvailable made virtual.
@@ -143,8 +143,20 @@ NativeRegisterContextNetBSD_x86_64::GetR
int NativeRegisterContextNetBSD_x86_64::GetSetForNativeRegNum(
@@ -56,7 +65,7 @@ $NetBSD$
+ case lldb_dr5_x86_64:
+ case lldb_dr6_x86_64:
+ case lldb_dr7_x86_64:
-+ reg_value = (uint64_t)m_dbr_x86_64.regs[reg - lldb_dr0_x86_64];
++ reg_value = (uint64_t)m_dbr_x86_64.dr[reg - lldb_dr0_x86_64];
+ break;
}
@@ -73,7 +82,7 @@ $NetBSD$
+ case lldb_dr5_x86_64:
+ case lldb_dr6_x86_64:
+ case lldb_dr7_x86_64:
-+ m_dbr_x86_64.regs[reg - lldb_dr0_x86_64] = reg_value.GetAsUInt64();
++ m_dbr_x86_64.dr[reg - lldb_dr0_x86_64] = reg_value.GetAsUInt64();
+ break;
}
@@ -89,7 +98,7 @@ $NetBSD$
+
+ RegisterValue reg_value;
+ const RegisterInfo *const reg_info =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr6_x86_64);
++ GetRegisterInfoAtIndex(lldb_dr6_x86_64);
+ Error error = ReadRegister(reg_info, reg_value);
+ if (error.Fail()) {
+ is_hit = false;
@@ -127,7 +136,7 @@ $NetBSD$
+
+ RegisterValue reg_value;
+ const RegisterInfo *const reg_info =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr7_x86_64);
++ GetRegisterInfoAtIndex(lldb_dr7_x86_64);
+ Error error = ReadRegister(reg_info, reg_value);
+ if (error.Fail()) {
+ is_vacant = false;
@@ -169,8 +178,8 @@ $NetBSD$
+
+ RegisterValue reg_value;
+ const RegisterInfo *const reg_info_dr7 =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-+ error = ReadRegister(reg_info, reg_value);
++ GetRegisterInfoAtIndex(lldb_dr7_x86_64);
++ error = ReadRegister(reg_info_dr7, reg_value);
+ if (error.Fail())
+ return error;
+
@@ -194,13 +203,13 @@ $NetBSD$
+ control_bits |= enable_bit | rw_bits | size_bits;
+
+ const RegisterInfo *const reg_info_drN =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr0_x86_64 + wp_index);
++ GetRegisterInfoAtIndex(lldb_dr0_x86_64 + wp_index);
+ error = WriteRegister(reg_info_drN, RegisterValue(addr));
+ if (error.Fail())
+ return error;
+
+ error =
-+ WriteRegisterRaw(reg_info_dr7, RegisterValue(control_bits));
++ WriteRegister(reg_info_dr7, RegisterValue(control_bits));
+ if (error.Fail())
+ return error;
+
@@ -218,7 +227,7 @@ $NetBSD$
+ // for watchpoints 0, 1, 2, or 3, respectively,
+ // clear bits 0, 1, 2, or 3 of the debug status register (DR6)
+ const RegisterInfo *const reg_info_dr6 =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr6_x86_64);
++ GetRegisterInfoAtIndex(lldb_dr6_x86_64);
+ Error error = ReadRegister(reg_info_dr6, reg_value);
+ if (error.Fail())
+ return false;
@@ -232,8 +241,8 @@ $NetBSD$
+ // clear bits {0-1,16-19}, {2-3,20-23}, {4-5,24-27}, or {6-7,28-31}
+ // of the debug control register (DR7)
+ const RegisterInfo *const reg_info_dr7 =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-+ error = ReadRegisterRaw(reg_info_dr7, reg_value);
++ GetRegisterInfoAtIndex(lldb_dr7_x86_64);
++ error = ReadRegister(reg_info_dr7, reg_value);
+ if (error.Fail())
+ return false;
+ bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
@@ -247,7 +256,7 @@ $NetBSD$
+
+ // clear bits {0-4} of the debug status register (DR6)
+ const RegisterInfo *const reg_info_dr6 =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr6_x86_64);
++ GetRegisterInfoAtIndex(lldb_dr6_x86_64);
+ Error error = ReadRegister(reg_info_dr6, reg_value);
+ if (error.Fail())
+ return error;
@@ -259,7 +268,7 @@ $NetBSD$
+
+ // clear bits {0-7,16-31} of the debug control register (DR7)
+ const RegisterInfo *const reg_info_dr7 =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr7_x86_64);
++ GetRegisterInfoAtIndex(lldb_dr7_x86_64);
+ error = ReadRegister(reg_info_dr7, reg_value);
+ if (error.Fail())
+ return error;
@@ -294,8 +303,8 @@ $NetBSD$
+ return LLDB_INVALID_ADDRESS;
+ RegisterValue reg_value;
+ const RegisterInfo *const reg_info_drN =
-+ register_context_sp->GetRegisterInfoAtIndex(lldb_dr0_x86_64 + wp_index);
-+ if (ReadRegisterRaw(reg_info_drN, reg_value).Fail())
++ GetRegisterInfoAtIndex(lldb_dr0_x86_64 + wp_index);
++ if (ReadRegister(reg_info_drN, reg_value).Fail())
+ return LLDB_INVALID_ADDRESS;
+ return reg_value.GetAsUInt64();
+}
Home |
Main Index |
Thread Index |
Old Index