Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
简单的代码,例如:
void* print_my_address() { printf("%p\n", .../* get the execution address of print_my_address */) }
谢谢!
PS:gcc v4.7 可以通过编译器获取地址吗?
与您对任何其他常规变量执行此操作的方式相同:
void print_my_address() { printf("%p\n", &print_my_address); }