I’m debugging a daemon in gdb by attaching gdb to the daemon process, and setting gdb to follow the child when it forks. It would be very useful to somehow figure out where the function I am in currently, is located – i.e. if the function were present in the daemon binary or a shared object that were loaded. If it were a shared object, it would be useful to have its name or path.
Can this be done?
1 Answer