remoteprocess
This crate provides a cross platform way of querying information about other processes running on the system. This let's you build profiling and debugging tools.
Features:
- Suspending the execution of the process
- Getting the process executable name and current working directory
- Get the command line of the process
- Listing all the threads in the process
- Get all the child processes of the process
- Figure out if a thread is active or not
- Read memory from the other proceses (using read_proceses_memory crate)
By enabling the unwind feature you can also:
- Get a stack trace for a thread in the target process
- Resolve symbols for an address in the other process
This crate provides implementations for Linux, OSX, FreeBSD and Windows
Usage
To show a stack trace from each thread in a program
A complete program with this code can be found in the examples folder.
Limitations
Currently we only have implementations for getting stack traces on some platforms:
Linux | Windows | OSX | FreeBSD | |
---|---|---|---|---|
i686 | ||||
x86-64 | yes | yes | ||
ARM | yes | |||
Aarch64 |
Credits
This crate heavily relies on the gimli project. Gimli is an amazing tool for parsing DWARF debugging information, and we are using it here for looking up filename and line numbers given an instruction pointer.