Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Rylek <trylek@microsoft.com>2017-06-13 03:17:17 +0300
committerTomas Rylek <trylek@microsoft.com>2017-06-13 03:17:17 +0300
commit7af7188d9eba6d062bb43b64717b713699ed7aec (patch)
tree40cd76bc614e51491dc3d1b2f65f2349764215cd /src/Native/Runtime/i386
parent4656e2e04365746b8c214fec738fc2d5ab405448 (diff)
Unify StackFrameIterator behavior w.r.t. various special addresses within MRT helpers
This change unifies StackFrameIterator behavior w.r.t. to special handling of various internal addresses within MRT helpers to the way I fixed this before for the UniversalTransitionThunk i.e. instead of exporting a public symbol in the middle of the method which is known to confuse the DIA stack unwinder, we export the pointer by means of an auxiliary data variable. [tfs-changeset: 1661485]
Diffstat (limited to 'src/Native/Runtime/i386')
-rw-r--r--src/Native/Runtime/i386/AsmMacros.inc18
-rw-r--r--src/Native/Runtime/i386/CallDescrWorker.asm12
-rw-r--r--src/Native/Runtime/i386/ExceptionHandling.asm18
-rw-r--r--src/Native/Runtime/i386/UniversalTransition.asm15
4 files changed, 33 insertions, 30 deletions
diff --git a/src/Native/Runtime/i386/AsmMacros.inc b/src/Native/Runtime/i386/AsmMacros.inc
index ab09d7fd8..2c305c3f0 100644
--- a/src/Native/Runtime/i386/AsmMacros.inc
+++ b/src/Native/Runtime/i386/AsmMacros.inc
@@ -35,6 +35,24 @@ decoratedName label proc
PUBLIC decoratedName
endm
+EXPORT_POINTER_TO_ADDRESS macro Name
+
+ local AddressToExport
+
+AddressToExport label proc
+
+ .const
+
+ align 4
+
+Name dd offset AddressToExport
+
+ public Name
+
+ .code
+
+ endm
+
__tls_array equ 2Ch ;; offsetof(TEB, ThreadLocalStoragePointer)
;;
diff --git a/src/Native/Runtime/i386/CallDescrWorker.asm b/src/Native/Runtime/i386/CallDescrWorker.asm
index f73bb9b64..cc4262c5e 100644
--- a/src/Native/Runtime/i386/CallDescrWorker.asm
+++ b/src/Native/Runtime/i386/CallDescrWorker.asm
@@ -49,7 +49,7 @@ donestack:
mov eax,[ebx + OFFSETOF__CallDescrData__pTarget]
call eax
-ReturnFromCallDescrThunk label proc
+ EXPORT_POINTER_TO_ADDRESS _PointerToReturnFromCallDescrThunk
; Symbol used to identify thunk call to managed function so the special
; case unwinder can unwind through this function. Sadly we cannot directly
@@ -92,16 +92,6 @@ ReturnsDouble:
FASTCALL_ENDFUNC
- .const
-
- align 4
-
-_PointerToReturnFromCallDescrThunk label dword
-
- dd offset ReturnFromCallDescrThunk
-
- public _PointerToReturnFromCallDescrThunk
-
endif
end
diff --git a/src/Native/Runtime/i386/ExceptionHandling.asm b/src/Native/Runtime/i386/ExceptionHandling.asm
index d96ed44b8..d8c4653fb 100644
--- a/src/Native/Runtime/i386/ExceptionHandling.asm
+++ b/src/Native/Runtime/i386/ExceptionHandling.asm
@@ -72,7 +72,8 @@ FASTCALL_FUNC RhpThrowHwEx, 0
;; ecx still contains the exception code
;; edx contains the address of the ExInfo
call RhThrowHwEx
-ALTERNATE_ENTRY RhpThrowHwEx2
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToRhpThrowHwEx2
;; no return
int 3
@@ -148,7 +149,8 @@ FASTCALL_FUNC RhpThrowEx, 0
;; ecx still contains the exception object
;; edx contains the address of the ExInfo
call RhThrowEx
-ALTERNATE_ENTRY RhpThrowEx2
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToRhpThrowEx2
;; no return
int 3
@@ -216,7 +218,8 @@ FASTCALL_FUNC RhpRethrow, 0
;; ecx contains the currently active ExInfo
;; edx contains the address of the new ExInfo
call RhRethrow
-ALTERNATE_ENTRY RhpRethrow2
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToRhpRethrow2
;; no return
int 3
@@ -305,7 +308,8 @@ FASTCALL_FUNC RhpCallCatchFunclet, 0
;; EDX: funclet IP
;; EAX: funclet EBP
call RhpCallFunclet
-ALTERNATE_ENTRY RhpCallCatchFunclet2
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToRhpCallCatchFunclet2
;; eax: resume IP
mov [esp + esp_offsetof_ResumeIP], eax ;; save for later
@@ -381,7 +385,8 @@ FASTCALL_FUNC RhpCallFinallyFunclet, 0
;; EDX: funclet IP
;; EAX: funclet EBP
call RhpCallFunclet
-ALTERNATE_ENTRY RhpCallFinallyFunclet2
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToRhpCallFinallyFunclet2
pop edx ;; restore REGDISPLAY*
@@ -434,7 +439,8 @@ FASTCALL_FUNC RhpCallFilterFunclet, 0
mov edx, [esp + 0] ;; reload filter funclet address
call RhpCallFunclet
-ALTERNATE_ENTRY RhpCallFilterFunclet2
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToRhpCallFilterFunclet2
;; EAX contains the result of the filter execution
mov edx, [ebp + 8]
diff --git a/src/Native/Runtime/i386/UniversalTransition.asm b/src/Native/Runtime/i386/UniversalTransition.asm
index 9ee597ea7..4d51398da 100644
--- a/src/Native/Runtime/i386/UniversalTransition.asm
+++ b/src/Native/Runtime/i386/UniversalTransition.asm
@@ -74,7 +74,8 @@ ALTERNATE_ENTRY Rhp&FunctionName&@0
mov edx, [ebp-4] ; Get the extra argument to pass to the callee
lea ecx, [ebp-10h] ; Get pointer to edx value pushed above
call eax
-ReturnFrom&FunctionName label proc
+
+ EXPORT_POINTER_TO_ADDRESS _PointerToReturnFrom&FunctionName
; We cannot make the label public as that tricks DIA stackwalker into thinking
; it's the beginning of a method. For this reason we export an auxiliary variable
@@ -88,18 +89,6 @@ ReturnFrom&FunctionName label proc
FASTCALL_ENDFUNC
- .const
-
- align 4
-
-_PointerToReturnFrom&FunctionName label dword
-
- dd offset ReturnFrom&FunctionName
-
- public _PointerToReturnFrom&FunctionName
-
- .code
-
endm
; To enable proper step-in behavior in the debugger, we need to have two instances