Skip to content
Advertisement

strace -e trace=network only showing SIGCHLD?

I am using the command:

strace -tt -o ${filename} -e trace=network gdb –args ${EXECUTABLE}

to track which system calls occur whilst connecting to and sending messages to a peer. However, I am only receiving the following entries:

JavaScript

Should I not see the socket calls to read() close() etc?

Advertisement

Answer

Using strace with gdb --args ${EXECUTABLE} prints syscall of gdb, instead of syscall of the executable running under gdb.

In order to prints syscall of your executable you could use :

JavaScript

The ‘-f’ option ask to strace to follow forks, this is useful when an executable fork new thread or new process.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement