Changeset 97868 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Dec 27, 2022 12:29:36 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/compiler/vcc/except-x86-vcc-asm.asm
r97866 r97868 41 41 ;********************************************************************************************************************************* 42 42 %include "iprt/asmdefs.mac" 43 44 45 ;********************************************************************************************************************************* 46 ;* Defined Constants And Macros * 47 ;********************************************************************************************************************************* 48 49 ;; @def WITH_NLG_STUFF 50 ; Enabled NLG debugger hooks/whatever - no idea how it's used. 51 ; 52 ; So far vsdebugeng.manimpl.dll in the VS2019 remote debugger directory is the 53 ; only component with any _NLG_ strings in it. Could not find any references 54 ; to _NLG_ in windbg. 55 %define WITH_NLG_STUFF 1 43 56 44 57 … … 97 110 safeseh _rtVccEh4DoLocalUnwindHandler@16 98 111 112 %ifdef WITH_NLG_STUFF 113 BEGINDATA 114 GLOBALNAME_RAW __NLG_Destination, data, hidden 115 dd 019930520h 116 dd 0 117 dd 0 118 dd 0 119 %endif 120 99 121 100 122 BEGINCODE 123 124 %ifdef WITH_NLG_STUFF 125 126 ;; 127 ; Some VS debugger interface, I think. 128 ; 129 ; @param EDX Notification code. 130 ; @uses EBP, EAX & ECX are preserved. This differs from other implementation, 131 ; but simplifies the calling code. 132 ; 133 ALIGNCODE(32) 134 GLOBALNAME_RAW __NLG_Notify, function, hidden 135 ; 136 ; Save registers. 137 ; 138 push eax 139 push ecx 140 push ebp 141 push ebx 142 143 144 ; 145 ; ECX = notification code. 146 ; EBX = __NLG_Destination 147 ; 148 mov ecx, edx ; Originally held in ECX, so moving it there for now. 149 mov ebx, __NLG_Destination 150 151 __NLG_Go: 152 ; 153 ; Save info to __NLG_Destination and the stack (same layout). 154 ; 155 mov [ebx + 0ch], ebp 156 push ebp 157 mov [ebx + 08h], ecx 158 push ecx 159 mov [ebx + 04h], eax 160 push eax 161 162 ; 163 ; This is presumably the symbol the debugger hooks on to as the string 164 ; "__NLG_Dispatch" was found in vsdebugeng.manimpl.dll in VS2019. 165 ; 166 global __NLG_Dispatch 167 __NLG_Dispatch: 168 169 ; Drop the info structure from the stack. 170 add esp, 4*3 171 172 ; 173 ; Restore registers and drop the parameter as we return. 174 ; 175 ; Note! This may sabotage attempts by the debugger to modify the state... 176 ; But that can be fixed once we know this is a requirement. Just 177 ; keep things simple for the caller for now. 178 ; 179 pop ebx 180 pop ebp 181 pop ecx 182 pop eax 183 ret 184 185 ;; 186 ; NLG call + return2. 187 ; 188 ; The "__NLG_Return2" symbol was observed in several vsdebugeng.manimpl.dll 189 ; strings in VS2019. 190 ; 191 ALIGNCODE(4) 192 GLOBALNAME_RAW __NLG_Call, function, hidden 193 call eax 194 195 global __NLG_Return2 196 __NLG_Return2: 197 ret 198 199 %endif 200 201 101 202 ;; 102 203 ; Calls the filter sub-function for a __finally statement. … … 108 209 ; @param pbFrame [ebp + 10h] 109 210 ; 211 ALIGNCODE(64) 110 212 BEGINPROC rtVccEh4DoFinally 111 213 push ebp … … 115 217 push esi 116 218 117 ;; @todo we're not calling __NLG_Notify nor NLG_Call, which may perhaps confuse debuggers or something...118 119 219 xor edi, edi 120 220 xor esi, esi 221 %ifndef WITH_NLG_STUFF 121 222 xor edx, edx 223 %endif 122 224 xor ebx, ebx 123 225 … … 126 228 mov ebp, [ebp + 10h] ; pbFrame 127 229 230 %ifdef WITH_NLG_STUFF 231 mov edx, 101h 232 call __NLG_Notify 233 xor edx, edx 234 235 call __NLG_Call 236 %else 128 237 call eax 238 %endif 129 239 130 240 pop esi … … 144 254 ; @param pbFrame [ebp + 0ch] 145 255 ; 256 ALIGNCODE(32) 146 257 BEGINPROC rtVccEh4DoFiltering 147 258 push ebp … … 175 286 ; @param pbFrame [ebp + 0ch] 176 287 ; 288 ALIGNCODE(32) 177 289 BEGINPROC rtVccEh4JumpToHandler 178 290 ; … … 183 295 mov ebp, [esp + 1 * 4 + 4] ; pbFrame 184 296 185 %if 0 297 %ifdef WITH_NLG_STUFF 298 ; 299 ; Notify VS debugger/whatever. 300 ; 186 301 mov eax, esi 187 push1188 call NAME(_NLG_Notify)302 mov edx, 1 303 call __NLG_Notify 189 304 %endif 190 305 … … 202 317 203 318 204 205 319 ;; 206 320 ; This does global unwinding via RtlUnwind. … … 211 325 ; @param pXcptRegRec [ebp + 0ch] 212 326 ; 327 ALIGNCODE(32) 213 328 BEGINPROC rtVccEh4DoGlobalUnwind 214 329 push ebp
Note:
See TracChangeset
for help on using the changeset viewer.