How to use the Strace debugging tool. Strace is a program debugging tool in Linux. it monitors the system calls used by an application and the system information it receives. Strace is a useful tool. it
StraceYes
LinuxA program debugging tool in the environment to monitor the system calls used by an application and the system information it receives.
Strace is a useful tool that lets you know what a program is doing in the background by tracking system calls. Strace is a basic debugging tool installed by default on most Linux systems, but it is an excellent software even if you are not tracking a problem. It tells you a lot about how a Linux program works.
Let's start with a simple UNIX command pwd, and then study in depth what the command does when it completes its task. Start xterm to create a controlled environment for the experiment, and then enter the following command:
$ Pwd
The pwd command displays the current working directory. On my computer, the output at the time was:
/Home/bill/
Such a simple function masks the complexity of the underlying layer of the command (by the way, all computer programs are like this ). To truly understand its complexity, run the pwd command again using strace:
$ Strace pwd
With this command, you can see that many operations are performed on UNIX computers during the process of displaying and listing the current working directory.
Http://www.bkjia.com/PHPjc/327287.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327287.htmlTechArticlestrace is a program debugging tool in Linux environment, used to monitor the system call used by an application and the system information it receives. Strace is a useful tool. it...