If you have a good name for a method, you do not need to look at the body - Fowler et al.
There are only two hard things in Computer Science: cache invalidation and naming things - Phil Karlton
There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors Leon Bambrick
parse()
instead of parsing()
or parsed()
g++ -S struct.cpp
struct
scallq
, call
, call1
, bl
) and return from a function (retq
, ret
, retl
)C++ Function | Assembly Name |
---|---|
action() |
__Z6actionv |
action(int) |
__Z6actioni |
action(double) |
__Z6actiond |
action(char) |
__Z6actionc |
action(double&) |
__Z6actionRd |
action(double const&) |
__Z6actionRKd |
action(double*) |
__Z6actionPd |
action(double const*) |
__Z6actionPKd |
action(std::vector<int>&) |
__Z6actionRNSt3__16vectorIiNS_9allocatorIiEEEE |
action(const std::vector<int>&) |
__Z6actionRKNSt3__16vectorIiNS_9allocatorIiEEEE |
Description | Command |
---|---|
Compile to Assembly | g++ -S overloading.cpp |
Compile to x86 Assembly on M1 Mac | g++ -target x86_64 -S overloading.cpp |
List symbols in object file | nm overloading |
Demangle a symbol | c++filt __Z6actioni |
Demangle all symbols in object file | nm --demangle overloading |