1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
From 89471c935995146d2079bd830dd85839caad660a Mon Sep 17 00:00:00 2001
From: Igor Kulaychuk <i.kulaychuk@samsung.com>
Date: Thu, 5 Apr 2018 22:02:48 +0300
Subject: [PATCH 6/7] Fix x86/Linux ICorDebug frames API
---
src/debug/di/rspriv.h | 4 ++--
src/debug/di/rsthread.cpp | 30 +++++++++++++++---------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/debug/di/rspriv.h b/src/debug/di/rspriv.h
index d714517..a28e7d9 100644
--- a/src/debug/di/rspriv.h
+++ b/src/debug/di/rspriv.h
@@ -7113,10 +7113,10 @@ public:
bool IsFunclet();
bool IsFilterFunclet();
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
// return the offset of the parent method frame at which an exception occurs
SIZE_T GetParentIP();
-#endif // DBG_TARGET_WIN64 || DBG_TARGET_ARM
+#endif // WIN64EXCEPTIONS
TADDR GetAmbientESP() { return m_taAmbientESP; }
TADDR GetReturnRegisterValue();
diff --git a/src/debug/di/rsthread.cpp b/src/debug/di/rsthread.cpp
index aa85de8..f027e11 100644
--- a/src/debug/di/rsthread.cpp
+++ b/src/debug/di/rsthread.cpp
@@ -5867,11 +5867,11 @@ const DT_CONTEXT * CordbRuntimeUnwindableFrame::GetContext() const
// default constructor to make the compiler happy
CordbMiscFrame::CordbMiscFrame()
{
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
this->parentIP = 0;
this->fpParentOrSelf = LEAF_MOST_FRAME;
this->fIsFilterFunclet = false;
-#endif // _WIN64
+#endif // WIN64EXCEPTIONS
}
// the real constructor which stores the funclet-related information in the CordbMiscFrame
@@ -6341,7 +6341,7 @@ HRESULT CordbNativeFrame::IsMatchingParentFrame(ICorDebugNativeFrame2 * pPotenti
ThrowHR(CORDBG_E_NOT_CHILD_FRAME);
}
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
CordbNativeFrame * pFrameToCheck = static_cast<CordbNativeFrame *>(pPotentialParentFrame);
if (pFrameToCheck->IsFunclet())
{
@@ -6355,7 +6355,7 @@ HRESULT CordbNativeFrame::IsMatchingParentFrame(ICorDebugNativeFrame2 * pPotenti
IDacDbiInterface * pDAC = GetProcess()->GetDAC();
*pIsParent = pDAC->IsMatchingParentFrame(fpToCheck, fpParent);
}
-#endif // DBG_TARGET_WIN64 || DBG_TARGET_ARM
+#endif // WIN64EXCEPTIONS
}
EX_CATCH_HRESULT(hr);
@@ -7444,14 +7444,14 @@ bool CordbNativeFrame::IsLeafFrame() const
SIZE_T CordbNativeFrame::GetInspectionIP()
{
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
// On 64-bit, if this is a funclet, then return the offset of the parent method frame at which
// the exception occurs. Otherwise just return the normal offset.
return (IsFunclet() ? GetParentIP() : m_ip);
#else
// Always return the normal offset on all other platforms.
return m_ip;
-#endif // DBG_TARGET_WIN64 || DBG_TARGET_ARM
+#endif // WIN64EXCEPTIONS
}
//---------------------------------------------------------------------------------------
@@ -7464,11 +7464,11 @@ SIZE_T CordbNativeFrame::GetInspectionIP()
bool CordbNativeFrame::IsFunclet()
{
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
return (m_misc.parentIP != NULL);
-#else // !DBG_TARGET_WIN64 && !DBG_TARGET_ARM
+#else
return false;
-#endif // DBG_TARGET_WIN64 || DBG_TARGET_ARM
+#endif // WIN64EXCEPTIONS
}
//---------------------------------------------------------------------------------------
@@ -7481,15 +7481,15 @@ bool CordbNativeFrame::IsFunclet()
bool CordbNativeFrame::IsFilterFunclet()
{
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
return (IsFunclet() && m_misc.fIsFilterFunclet);
-#else // !DBG_TARGET_WIN64 && !DBG_TARGET_ARM
+#else
return false;
-#endif // DBG_TARGET_WIN64
+#endif // WIN64EXCEPTIONS
}
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
//---------------------------------------------------------------------------------------
//
// Return the offset of the parent method frame at which the exception occurs.
@@ -7502,7 +7502,7 @@ SIZE_T CordbNativeFrame::GetParentIP()
{
return m_misc.parentIP;
}
-#endif // DBG_TARGET_WIN64 || DBG_TARGET_ARM
+#endif // WIN64EXCEPTIONS
// Accessor for the shim private hook code:CordbThread::ConvertFrameForILMethodWithoutMetadata.
// Refer to that function for comments on the return value, the argument, etc.
@@ -8530,7 +8530,7 @@ HRESULT CordbJITILFrame::GetNativeVariable(CordbType *type,
HRESULT hr = S_OK;
-#if defined(DBG_TARGET_WIN64) || defined(DBG_TARGET_ARM)
+#ifdef WIN64EXCEPTIONS
if (m_nativeFrame->IsFunclet())
{
if ( (pNativeVarInfo->loc.vlType != ICorDebugInfo::VLT_STK) &&
--
2.7.4
|