0

I was analysing a multi-threaded process using strace and gdb. On one of the pid I used the below command to analyse:

strace -tt -T -p 824722 2>&1 | grep -v "FUTEX"

The output showed that continuous calls to 'sendto' were being made. However when I attached gdb to the process, set breakpoint on 'sendto' and set the condition with respect to the thread ID(condition 1 $_thread==tid), I was surprised to see that gdb didn't find any 'sendto' function call.

What might be the reason behind gdb not detecting the function call? I have the source code also, but it will be easier for me if gdb/strace can tell me the exact line which led to 'sendto' call.

Vishal Sharma
  • 1,670
  • 20
  • 55

1 Answers1

0

I struggled for a very long time with this. Finally I got the solution in the comment section here.

So basically, instead of breakpoint, when I used 'catch syscall sendto', only then was gdb able to detect the 'sendto' call.

Vishal Sharma
  • 1,670
  • 20
  • 55