Use the Strace tool to track system calls and Signals

Source: Internet
Author: User

Use Strace to execute the program, it will log the program during the execution of the call, received the signal, by looking at the record results, you can know the program to open which files, what to read and write, what memory mapped, how much memory to the system to request information

Strace transplant

Download Strace Source: strace-4.5.15.tar.bz2

Unzip: Tar xjf strace-4.5.15.tar.bz2,

If you want to run on your own board and you need to configure it, I'm using a patch made by Vedon.

Strace-fix-arm-bad-syscall.patch

To make a patch:

PATCH-PN < (patch directory) strace-fix-arm-bad-syscall.patch

In the strace-4.5.15 directory and then perform the compilation

./configure--host=arm-linux CC=ARM-LINUX-GCC

Make

Once compiled, an application is generated strace

Copy this strace to the file system Bin directory and you can use it in the file system.

/work/debug/strace-4.5.15$ CP Strace/work/nfs_root/first_fs/bin

Use the Strace tool to track system calls and Signals

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.