Better Living with strace and ltrace

It is important to understand the difference between library functions and system calls. Library functions are higher level, run completely in user space, and provide a more convenient interface for the programmer to the functions that do the real work—system calls. System calls do work in kernel mode on the user's behalf and are provided by the kernel of the operating system itself. The library function printf() may look like a very general printing function, but all it really does is format the data you give it into strings and write the string data using the low-level system call write(), which then sends the data to a file associated with your terminal's standard output.

The strace utility prints ...

Get The Art of Debugging with GDB, DDD, and Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.