pkgsrc-WIP-changes archive

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

lldb-git: Revamp patch for RegisterContextNetBSD_x86_64



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Jan 28 00:59:12 2016 +0100
Changeset:	3a6deeddd9eba16d4e97d4dc446b4ed4e190f658

Modified Files:
	lldb-git/distinfo
	lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp
Added Files:
	lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterInfos__x86__64.h

Log Message:
lldb-git: Revamp patch for RegisterContextNetBSD_x86_64

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

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

diffstat:
 lldb-git/distinfo                                  |  3 +-
 ...cess_Utility_RegisterContextNetBSD__x86__64.cpp | 66 +++++++++----------
 ...lugins_Process_Utility_RegisterInfos__x86__64.h | 74 ++++++++++++++++++++++
 3 files changed, 106 insertions(+), 37 deletions(-)

diffs:
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index ee12bcb..a220a83 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/distinfo
@@ -21,8 +21,9 @@ SHA1 (patch-lldb_include_lldb_Utility_regex__impl.h) = bcf360a61912ee0730966eec2
 SHA1 (patch-lldb_include_lldb_Utility_regutils.h) = b7347d263781170a017c012522be8dd806bcf585
 SHA1 (patch-lldb_scripts_CMakeLists.txt) = 46e02f8f07e6977df706b2f2bae3469a4b13a320
 SHA1 (patch-lldb_source_Plugins_Process_Utility_CMakeLists.txt) = 9d0d67f17bbf05061894490430844d5f70ebd6e0
-SHA1 (patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp) = f5315f4fc51d92eeefe24af1a3385b49b3871403
+SHA1 (patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp) = 7d2919646f269bae4d2f066c9afab16d1c25a193
 SHA1 (patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.h) = 473673971adf6927af6d597767c80ec6e95d79b6
+SHA1 (patch-lldb_source_Plugins_Process_Utility_RegisterInfos__x86__64.h) = 9a14671d090515068b94d4d4a8f1099738dde44e
 SHA1 (patch-lldb_source_Utility_CMakeLists.txt) = 3588546023de817eef056ceb26d8b2859484122f
 SHA1 (patch-lldb_source_Utility_regcomp.c) = bbe8132f8454b064c775a75a1380717e9deb6489
 SHA1 (patch-lldb_source_Utility_regerror.c) = 71ba9fc270e3b31186d72879bccbd7b58552f152
diff --git a/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp b/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp
index f9be2a9..0a2f64d 100644
--- a/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp
+++ b/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterContextNetBSD__x86__64.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp.orig	2016-01-23 15:05:04.000000000 +0000
+--- lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp.orig	2016-01-27 23:48:07.000000000 +0000
 +++ lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp
-@@ -0,0 +1,124 @@
+@@ -0,0 +1,118 @@
 +//===-- RegisterContextNetBSD_x86_64.cpp ----------------------*- C++ -*-===//
 +//
 +//                     The LLVM Compiler Infrastructure
@@ -22,51 +22,45 @@ $NetBSD$
 +// src/sys/arch/amd64/include/frame_regs.h
 +typedef struct _GPR
 +{
-+    int64_t rdi;     /*  0 */
-+    int64_t rsi;     /*  1 */
-+    int64_t rdx;     /*  2 */
-+    int64_t rcx;     /*  3 */
-+    int64_t r8;      /*  4 */
-+    int64_t r9;      /*  5 */
-+    int64_t r10;     /*  6 */
-+    int64_t r11;     /*  7 */
-+    int64_t r12;     /*  8 */
-+    int64_t r13;     /*  9 */
-+    int64_t r14;     /* 10 */
-+    int64_t r15;     /* 11 */
-+    int64_t rbp;     /* 12 */
-+    int64_t rbx;     /* 13 */
-+    int64_t rax;     /* 14 */
-+    int64_t gs;      /* 15 */
-+    int64_t fs;      /* 16 */
-+    int64_t es;      /* 17 */
-+    int64_t ds;      /* 18 */
-+    int64_t trapno;  /* 19 */
-+    int64_t err;     /* 20 */
-+    int64_t rip;     /* 21 */
-+    int64_t cs;      /* 22 */
-+    int64_t rflags;  /* 23 */
-+    int64_t rsp;     /* 24 */
-+    int64_t ss;      /* 25 */
++    uint64_t rdi;     /*  0 */
++    uint64_t rsi;     /*  1 */
++    uint64_t rdx;     /*  2 */
++    uint64_t rcx;     /*  3 */
++    uint64_t r8;      /*  4 */
++    uint64_t r9;      /*  5 */
++    uint64_t r10;     /*  6 */
++    uint64_t r11;     /*  7 */
++    uint64_t r12;     /*  8 */
++    uint64_t r13;     /*  9 */
++    uint64_t r14;     /* 10 */
++    uint64_t r15;     /* 11 */
++    uint64_t rbp;     /* 12 */
++    uint64_t rbx;     /* 13 */
++    uint64_t rax;     /* 14 */
++    uint64_t gs;      /* 15 */
++    uint64_t fs;      /* 16 */
++    uint64_t es;      /* 17 */
++    uint64_t ds;      /* 18 */
++    uint64_t trapno;  /* 19 */
++    uint64_t err;     /* 20 */
++    uint64_t rip;     /* 21 */
++    uint64_t cs;      /* 22 */
++    uint64_t rflags;  /* 23 */
++    uint64_t rsp;     /* 24 */
++    uint64_t ss;      /* 25 */
 +} GPR;
 +
-+struct DBG {
-+    int64_t dr[8];
-+};
-+
 +struct UserArea {
 +    GPR      gpr;
++    uint64_t mc_tlsbase;
 +    FPR      fpr;
-+    DBG      dbg;
 +};
 +
-+#define DR_OFFSET(reg_index) \
-+    (LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
-+
 +//---------------------------------------------------------------------------
 +// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64 structure.
 +//---------------------------------------------------------------------------
 +#define DECLARE_REGISTER_INFOS_X86_64_STRUCT
++#define NO_DEBUGREGS
 +#include "RegisterInfos_x86_64.h"
 +#undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 +
diff --git a/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterInfos__x86__64.h b/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterInfos__x86__64.h
new file mode 100644
index 0000000..280330e
--- /dev/null
+++ b/lldb-git/patches/patch-lldb_source_Plugins_Process_Utility_RegisterInfos__x86__64.h
@@ -0,0 +1,74 @@
+$NetBSD$
+
+--- lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h.orig	2015-12-06 02:57:30.000000000 +0000
++++ lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
+@@ -48,7 +48,9 @@
+ // Number of bytes needed to represent a YMM register.
+ #define YMM_SIZE sizeof(YMMReg)
+ 
++#ifndef NO_DEBUGREGS
+ #define DR_SIZE sizeof(((DBG*)NULL)->dr[0])
++#endif
+ 
+ // RegisterKind: EHFrame, DWARF, Generic, Process Plugin, LLDB
+ 
+@@ -85,10 +87,12 @@
+       { dwarf_##reg##i##h_x86_64, dwarf_##reg##i##h_x86_64, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, lldb_##reg##i##_x86_64 }, \
+       NULL, NULL }
+ 
++#ifndef NO_DEBUGREGS
+ #define DEFINE_DR(reg, i)                                               \
+     { #reg#i, NULL, DR_SIZE, DR_OFFSET(i), eEncodingUint, eFormatHex,   \
+       { LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,  \
+       LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM }, NULL, NULL }
++#endif
+ 
+ #define DEFINE_GPR_PSEUDO_32(reg32, reg64)          \
+     { #reg32, NULL, 4, GPR_OFFSET(reg64), eEncodingUint,   \
+@@ -251,6 +255,7 @@ g_register_infos_x86_64[] =
+     DEFINE_YMM(ymm, 14),
+     DEFINE_YMM(ymm, 15),
+ 
++#ifndef NO_DEBUGREGS
+     // Debug registers for lldb internal use
+     DEFINE_DR(dr, 0),
+     DEFINE_DR(dr, 1),
+@@ -259,7 +264,8 @@ g_register_infos_x86_64[] =
+     DEFINE_DR(dr, 4),
+     DEFINE_DR(dr, 5),
+     DEFINE_DR(dr, 6),
+-    DEFINE_DR(dr, 7)
++    DEFINE_DR(dr, 7),
++#endif
+ };
+ 
+ static_assert((sizeof(g_register_infos_x86_64) / sizeof(g_register_infos_x86_64[0])) == k_num_registers_x86_64,
+@@ -314,10 +320,12 @@ do {                                    
+     g_register_infos[lldb_##reg##i##_i386].byte_offset = YMM_OFFSET(i);         \
+ } while(false);
+ 
++#ifndef NO_DEBUGREGS
+ #define UPDATE_DR_INFO(reg_index)                                               \
+ do {                                                                            \
+     g_register_infos[lldb_dr##reg_index##_i386].byte_offset = DR_OFFSET(reg_index);  \
+ } while(false);
++#endif
+ 
+     // Update the register offsets
+     UPDATE_GPR_INFO(eax,    rax);
+@@ -400,6 +408,7 @@ do {                                    
+     UPDATE_YMM_INFO(ymm, 6);
+     UPDATE_YMM_INFO(ymm, 7);
+ 
++#ifndef NO_DEBUGREGS
+     UPDATE_DR_INFO(0);
+     UPDATE_DR_INFO(1);
+     UPDATE_DR_INFO(2);
+@@ -408,6 +417,7 @@ do {                                    
+     UPDATE_DR_INFO(5);
+     UPDATE_DR_INFO(6);
+     UPDATE_DR_INFO(7);
++#endif
+ 
+ #undef UPDATE_GPR_INFO
+ #undef UPDATE_GPR_INFO_8H


Home | Main Index | Thread Index | Old Index