Source file src/runtime/signal_windows_arm64.go

     1  // Copyright 2025 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  import "internal/runtime/syscall/windows"
     8  
     9  func prepareContextForSigResume(c *windows.Context) {
    10  	c.X[0] = c.XSp
    11  	c.X[1] = c.Pc
    12  }
    13  
    14  func dumpregs(r *windows.Context) {
    15  	print("r0   ", hex(r.X[0]), "\n")
    16  	print("r1   ", hex(r.X[1]), "\n")
    17  	print("r2   ", hex(r.X[2]), "\n")
    18  	print("r3   ", hex(r.X[3]), "\n")
    19  	print("r4   ", hex(r.X[4]), "\n")
    20  	print("r5   ", hex(r.X[5]), "\n")
    21  	print("r6   ", hex(r.X[6]), "\n")
    22  	print("r7   ", hex(r.X[7]), "\n")
    23  	print("r8   ", hex(r.X[8]), "\n")
    24  	print("r9   ", hex(r.X[9]), "\n")
    25  	print("r10  ", hex(r.X[10]), "\n")
    26  	print("r11  ", hex(r.X[11]), "\n")
    27  	print("r12  ", hex(r.X[12]), "\n")
    28  	print("r13  ", hex(r.X[13]), "\n")
    29  	print("r14  ", hex(r.X[14]), "\n")
    30  	print("r15  ", hex(r.X[15]), "\n")
    31  	print("r16  ", hex(r.X[16]), "\n")
    32  	print("r17  ", hex(r.X[17]), "\n")
    33  	print("r18  ", hex(r.X[18]), "\n")
    34  	print("r19  ", hex(r.X[19]), "\n")
    35  	print("r20  ", hex(r.X[20]), "\n")
    36  	print("r21  ", hex(r.X[21]), "\n")
    37  	print("r22  ", hex(r.X[22]), "\n")
    38  	print("r23  ", hex(r.X[23]), "\n")
    39  	print("r24  ", hex(r.X[24]), "\n")
    40  	print("r25  ", hex(r.X[25]), "\n")
    41  	print("r26  ", hex(r.X[26]), "\n")
    42  	print("r27  ", hex(r.X[27]), "\n")
    43  	print("r28  ", hex(r.X[28]), "\n")
    44  	print("r29  ", hex(r.X[29]), "\n")
    45  	print("lr   ", hex(r.X[30]), "\n")
    46  	print("sp   ", hex(r.XSp), "\n")
    47  	print("pc   ", hex(r.Pc), "\n")
    48  	print("cpsr ", hex(r.Cpsr), "\n")
    49  }
    50  

View as plain text