Znwm和ZdlPv在组装中是什么意思? [英] What does Znwm and ZdlPv mean in assembly?

查看:280
本文介绍了Znwm和ZdlPv在组装中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是汇编程序的新手,我试图弄清楚C ++如何处理汇编程序中的动态调度.

I'm new to assembly and I'm trying to figure out how C++ handles dynamic dispatch in assembly.

查看汇编代码时,我发现有2个异常调用:

When looking through assembly code, I saw that there were 2 unusual calls:

call _Znwm
call _ZdlPv

这些没有我可以追踪到的子程序.通过检查代码,Znwm似乎在调用其构造函数时返回对象的地址,但是我不确定. ZdlPv处于无法访问的代码块中(它被跳过了). C ++:

These did not have a subroutine that I could trace them to. From examining the code, Znwm seemed to return the address of the object when its constructor was called, but I'm not sure about that. ZdlPv was in a block of code that could never be reached (it was jumped over). C++:

Fruit * f;
f = new Apple();

x86:

# BB#1:
    mov eax, 8
    mov edi, eax
    call    _Znwm
    mov rdi, rax
    mov rcx, rax
.Ltmp6:
    mov qword ptr [rbp - 48], rdi # 8-byte Spill
    mov rdi, rax
    mov qword ptr [rbp - 56], rcx # 8-byte Spill
    call    _ZN5AppleC2Ev

任何建议将不胜感激. 谢谢.

Any advice would be appreciated. Thanks.

推荐答案

_Znwm是运算符.
_ZdlPv是运算符删除.

_Znwm is operator new.
_ZdlPv is operator delete.

这篇关于Znwm和ZdlPv在组装中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆