-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
struct Base
{
virtual ~Base() = default;
virtual void foo() {}
int a;
};
__attribute__((noinline))
void doSomething(Base* b)
{
b->foo();
}
int main(int argc, const char* argv[])
{
doSomething(new Base);
return 0;
}<doSomething(Base*)>:
; b->foo();
400680: 48 8b 07 mov rax,QWORD PTR [rdi]
400683: ff 60 10 jmp QWORD PTR [rax+0x10]
<main>:
400690: 50 push rax
400691: bf 10 00 00 00 mov edi,0x10
; doSomething(new Base);
400696: e8 d5 fe ff ff call 400570 <operator new(unsigned long)@plt>
40069b: 48 c7 00 78 07 40 00 mov QWORD PTR [rax],0x400778
4006a2: 48 89 c7 mov rdi,rax
4006a5: e8 d6 ff ff ff call 400680 <doSomething(Base*)>Metadata
Metadata
Assignees
Labels
No labels