(gdb) info symbol 0x49f015
on_read in section .text
(gdb) info address on_read
Symbol "on_read" is a function at address 0x4cd87c.
如果需要在gdb中能查看宏定义,gcc编译的时候需要加上 -gdwarf-2 和 -g3 两个编译选项
(gdb) macro expand GRPC_STATS_INC_SYSCALL_READ(exec_ctx)
expands to: (__atomic_fetch_add((&(&grpc_stats_per_cpu_storage[(((exec_ctx)))->starting_cpu])->counters[(GRPC_STATS_COUNTER_SYSCALL_READ)]), (intptr_t)(1), 0))
(gdb) macro expand EINTR
expands to: 4