Objective
In this course, attendees will learn how to debug and profile embedded Linux systems.
Detailed agenda
- Introduction to software debugging, the software debugging process, main types of problems and debugging mechanisms, tools and techniques for debugging and profiling Linux systems.
- The development platform that will be used in the training, hardware features, references and documentation, development environment, build systems and Buildroot.
- Introduction to debugging applications with GDB, basic commands, execution control, breakpoints, watchpoints, catchpoints, printing variables and expressions, displaying memory, the stack backtrace, TUI mode, integration with DDD and Eclipse.
- Extracting information from kernel virtual file systems (procfs, sysfs, debugfs), debugging the Linux kernel with logging tools and techniques (printk, dynamic debug), analysis of kernel crash messages (oops and panic) with addr2line and GDB, debugging kernel modules, pstore, kdump.
- Static and dynamic tracing in kernel space, kernel tracing tools and techniques (ftrace, trace-cmd, kernelshark, systemtap), introduction to ftrace, tracing function calls, latency times and stack consumption, introduction to the trace-cmd command, graphical visualization of tracing data with the kernelshark tool.
- Interactive Linux kernel debugging with GDB (kgdb, gdbclient and agent-proxy), GDB and code optimization, KDB debug front-end, hardware-level debugging with JTAG.
- Linux kernel debugging frameworks, “Kernel Hacking” configuration menu, kernel memory leak detection with kmemleak, magic sysrq key, kernel deadlock detection.
- User space logging tools and techniques, crashes and core dump analysis in Linux, analyzing crashes in dynamic libraries with GDB.
- User space tracing tools, strace, ltrace, etrace, uprobe, perf, systemtap, lttng-ust.
- Using gdbserver to remote debug Linux applications, GDB and dynamic libraries, GDB and code optimization, debugging multithreaded applications with GDB.
- Debugging memory usage in Linux applications, memory usage analysis tools (free, procrank, pmap), debugging and identifying memory leaks with valgrind, mtrace, memwatch and dmalloc.
- Performance analysis in Linux systems, analysis of CPU consumption (uptime, cpuload, top, schedtop, time), memory consumption analysis (free, procrank, pmap), performance analysis with perf and oprofile, analyzing application performance with strace, ltrace and gprof.
For more details on the content of this training, you can download the agenda and the slides .
Additional information
Students, engineers and software developers of embedded Linux systems.
Attendees should know the basics of the GNU/Linux command line interface, development of embedded Linux systems, intermediate knowledge on developing programs in C/C++ and compiler tools like GCC and make.
The course material contains the slides of the presentations, the book of activities and exercises, reference guides, and additional reference documents. All materials will be provided in an electronic format at the start of the training session.
The training exercises are executed in the Colibri i.MX6 Toradex module with the Aster carrier board and an expansion board with a lot of peripherals, including LEDs, buttons, trimpot, buzzer, UART, temperature sensor, 7-segment display, GPIO expander and accelerometer. The development kit is loaned to students to carry out practical activities during the training. If necessary, and depending on the needs of the contracting company, the training can be carried out on another hardware platform.
The training can be presented in the following languages: Brazilian Portuguese and English.
If you plan to train your team or a group of people, consider a training session inside your company. In an in-company training session, the company is responsible for providing the necessary resources needed for the training, including the training room, data projector and development machines. This model also brings big advantages for the company, since the cost of transportation and accommodation of several employees is reduced only to the instructor. If your company has a special requirement, we can study a program that meets your needs, like preparing the training material for a specific hardware platform or developing additional content. Don’t hesitate to get in touch via email or the contact page .
Open training sessions are presented in a pleasant environment, with a properly equipped laboratory and Internet access. Classes are usually presented full-time, with a stop for lunch and a coffee break in the morning. If you are interested in attending an open session but there are no classes available, send a message via the contact page and we will notify you as soon as new classes open.
Due to the need to use a development kit to carry out practical activities, this training cannot currently be carried out online.
Photos gallery
Some pictures from previous training sessions: