(context: CpuContext)
| 148 | } |
| 149 | |
| 150 | function getStackPointer(context: CpuContext): NativePointer | null { |
| 151 | if (Process.arch === "arm64") { |
| 152 | return (context as Arm64CpuContext).sp; |
| 153 | } |
| 154 | |
| 155 | if (Process.arch === "arm") { |
| 156 | return (context as ArmCpuContext).sp; |
| 157 | } |
| 158 | |
| 159 | return context.sp; |
| 160 | } |
| 161 | |
| 162 | function getFramePointer(context: CpuContext): NativePointer | null { |
| 163 | if (Process.arch === "arm64") { |