No, both gdb and ltrace use ptrace
to debug and trace process, and tracee (target) process may be attached only to single ptrace tracer.
You may try implement some call tracing inside gdb with breakpoint function_name
or b function_addr
, getting breakpoint id and adding gdb commands
to execute at this breakpoint, for example for breakpoint with number 1:
commands 1
bt 2
p/x $rax
continue
gdb will print backtrace (bt), and rax register value, then it will continue execution (more examples and disabling of pagination is at What are the best ways to automate a GDB debugging session?).
Or you can try in-kernel tracing solution like sysdig
.