To debug a new process from
main(), a global breakpoint (not against any particular target/context) should be set, before starting the process. Symbol files are loaded based on path map settings, so there should be a corresponding entry for the new process before starting it.
To debug a process from
- Select a project in the Project Explorer view.
- Select . The Debug Configurations view appears.
- Click the Path Map view to set the path mappings for the selected debug configuration. Path maps help enable source level debugging. The debugger uses Path Map setting to search and load symbols files for all executable files and shared libraries in the system.
- Set either the line breakpoint in the source file of the Linux
application or function breakpoint at
main(). Every time a new process starts, the debugger checks symbols of the process and plants the breakpoint in the process if the source file or the
main()function is found in the symbols.
- Run the application from the terminal.
- As soon as the control hits a breakpoint, the Debug view is updated with the information of the process.
- The Debug view also shows the file, function and the line information of the breakpoint hit. A thread label includes the name of the CPU core, if the thread is currently running on a core.
- Source level debugging such as stepping in, stepping out, watching variables, stack trace can be performed. The target side path for a binary file does not include a mount point path. This is a known limitation. For example, when the process is located on the SD card, which is mounted at /mnt, the debugger shows the file as <filename> and not as the expected /mnt/<filename>.