获取当前指令执行地址

来源:互联网 发布:淘宝卖家客服怎么登录 编辑:程序博客网 时间:2024/05/23 00:03
void CurrentIpAddress(int *b){int a = 0;__asm{mov eax,[ebp+4];mov a,eax;}*b = a;}

int a = 0;CurrentIpAddress(&a);block:cout << "EIP := " << a << endl;cout << "我已经执行过了!" << endl;__asm{call a;//correct//jmp a;//error }

EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 8589764我已经执行过了!EIP := 85897^C



0 0
原创粉丝点击