• Home
  • Raw
  • Download

Lines Matching +full:monitor +full:- +full:script +full:- +full:pid

5 [![](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](./LICENSE)
7-to-integrate implementation of the [GDB Remote Serial Protocol](https://sourceware.org/gdb/online…
11-overhead-protocol-extensions) (IDETs) to expose fine-grained, zero-cost control over enabled GDB …
15 - [Documentation (gdbstub)](https://docs.rs/gdbstub)
16 - [Documentation (gdbstub_arch)](https://docs.rs/gdbstub_arch)
17 - [Changelog](CHANGELOG.md)
18 - [0.5 to 0.6 Transition Guide](docs/transition_guide.md)
22 - **Excellent Ergonomics**
23- Instead of simply exposing the underlying GDB protocol "warts and all", `gdbstub` tries to abs…
24- Instead of having to dig through [obscure XML files deep the GDB codebase](https://github.com/…
25- Organizes GDB's countless optional protocol extensions into a coherent, understandable, and ty…
26- Automatically handles client/server protocol feature negotiation, without needing to micro-man…
27- `gdbstub` makes _extensive_ use of Rust's powerful type system + generics to enforce protocol …
28- Using a novel technique called [**Inlineable Dyn Extension Traits**](#zero-overhead-protocol-e…
29 - **Easy to Integrate**
30- `gdbstub`'s API is designed to be a "drop in" solution when you want to add debugging support …
31 - **`#![no_std]` Ready & Size Optimized**
32- `gdbstub` is a **`no_std` first** library, whereby all protocol features are required to be `n…
33- `gdbstub` does not require _any_ dynamic memory allocation, and can be configured to use fixed
34- `gdbstub` is entirely **panic free** in most minimal configurations\*, resulting in substantia…
35- \*See the [Writing panic-free code](#writing-panic-free-code) section below for more details.
36- `gdbstub` is transport-layer agnostic, and uses a basic [`Connection`](https://docs.rs/gdbstub…
37- "You don't pay for what you don't use": All code related to parsing/handling protocol extensio…
38- `gdbstub`'s minimal configuration has an incredibly low binary size + RAM overhead, enabling i…
39- When compiled in release mode, using all the tricks outlined in [`min-sized-rust`](https://git…
40- \*Exact numbers vary by target platform, compiler version, and `gdbstub` revision. In mixed-lang…
46 …nges are typically quite minor, they are nonetheless semver-breaking, and may require a code-chang…
48-world projects](#real-world-examples) since its initial `0.1` release, and empirical evidence sug…
50 See the [Future Plans + Roadmap to `1.0.0`](#future-plans--roadmap-to-100) for more information on …
54 …features are completely optional, and getting a basic debugging session up-and-running only requir…
56 - Base GDB Protocol
57 - Read/Write memory
58 - Read/Write registers
59 - Enumerating threads
63 Of course, most use-cases will want to support additional debugging features as well. At the moment…
65 - Automatic target architecture + feature configuration
66 - Resume
67 - Continue
68 - Single Step
69 - Range Step
70 - _Reverse_ Step/Continue
71 - Breakpoints
72 - Software Breakpoints
73 - Hardware Breakpoints
74 - Read/Write/Access Watchpoints (i.e: value breakpoints)
75 - Extended Mode
76 - Launch new processes
77 - Attach to an existing process
78 - Kill an existing process
79 - Pass env vars + args to spawned processes
80 - Change working directory
81 - Enable/disable ASLR
82 - Read Memory Map (`info mem`)
83 - Read Section/Segment relocation offsets
84 - Handle custom `monitor` Commands
85 - Extend the GDB protocol with custom debug commands using GDB's `monitor` command!
86 - Host I/O
87 - Access the remote target's filesystem to read/write file
88 - Can be used to automatically read the remote executable on attach (using `ExecFile`)
89 - Read auxiliary vector (`info auxv`)
90 - Extra thread info (`info threads`)
91 - Extra library information (`info sharedlibraries`)
92 - Tracepoints
93 - Configure tracepoints and actions to perform when hit
94 - Select and interrogate collected trace frames
95 - _Note:_ Feature support is not exhaustive, and many feature haven't been implemented yet.
97 _Note:_ GDB features are implemented on an as-needed basis by `gdbstub`'s contributors. If there's …
99 … Remote Configuration Docs](https://sourceware.org/gdb/onlinedocs/gdb/Remote-Configuration.html) f…
101 ### Zero-overhead Protocol Extensions
103 …es to ensure any unused features are dead-code-eliminated in release builds _without_ having to re…
105 For example, if your target doesn't implement a custom GDB `monitor` command handler, the resulting…
107-level technical details of how IDETs work, I've included a brief writeup in the documentation [he…
113 When using `gdbstub` in `#![no_std]` contexts, make sure to set `default-features = false`.
115 - `alloc`
116 - Implement `Connection` for `Box<dyn Connection>`.
117 - Log outgoing packets via `log::trace!` (uses a heap-allocated output buffer).
118 - Provide built-in implementations for certain protocol features:
119- Use a heap-allocated packet buffer in `GdbStub` (if none is provided via `GdbStubBuilder::with…
120 - (Monitor Command) Use a heap-allocated output buffer in `ConsoleOutput`.
121 - `std` (implies `alloc`)
122- Implement `Connection` for [`TcpStream`](https://doc.rust-lang.org/std/net/struct.TcpStream.ht…
123- Implement [`std::error::Error`](https://doc.rust-lang.org/std/error/trait.Error.html) for `gdb…
124 - Add a `TargetError::Io` variant to simplify `std::io::Error` handling from Target methods.
125 - `paranoid_unsafe`
126- Please refer to the [`unsafe` in `gdbstub`](#unsafe-in-gdbstub) section below for more details.
127 - `core_error`
128- Make `GdbStubError` implement [`core::error::Error`](https://doc.rust-lang.org/core/error/trai…
132 ### Real-World Examples
138 - Virtual Machine Monitors (VMMs)
139- [OpenVMM/OpenHCL](https://openvmm.dev/reference/dev_feats/gdbstub.html) - (Microsoft) Modular,…
140- [firecracker](https://github.com/firecracker-microvm/firecracker/blob/main/docs/gdb-debugging.…
141- [crosvm](https://google.github.io/crosvm/running_crosvm/advanced_usage.html#gdb-support) - (Go…
142- [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor) - A VMM for modern cl…
143- [uhyve](https://github.com/hermitcore/uhyve) - A minimal hypervisor for [RustyHermit](https://…
144 - OS Kernels (using `gdbstub` on `no_std`)
145- [COCONUT-SVSM](https://github.com/coconut-svsm/svsm) - VM Service Module (SVSM), supporting Co…
146- [`betrusted-io/xous-core`](https://github.com/betrusted-io/xous-core/blob/b471b604/kernel/src/…
147- [`vmware-labs/node-replicated-kernel`](https://github.com/vmware-labs/node-replicated-kernel/t…
148 - Emulators
149- [obliteration](https://github.com/obhq/obliteration) - Kernel + VMM for running PS4 software o…
150 - [solana_rbpf](https://github.com/solana-labs/rbpf) - VM and JIT compiler for eBPF programs
151- [rustyboyadvance-ng](https://github.com/michelhe/rustboyadvance-ng/) - Nintendo Gameboy Advanc…
152 - [gamegirl](https://github.com/anellie/gamegirl) - A Gameboy (Color/Advance) emulator
153 - [bevy-atari](https://github.com/mrk-its/bevy-atari) - An Atari XL/XE Emulator (MOS 6502)
154 - [rmips](https://github.com/starfleetcadet75/rmips) - MIPS R3000 virtual machine simulator
155- [clicky](https://github.com/daniel5151/clicky/) - Emulator for classic clickwheel iPods (dual-
156 - [ts7200](https://github.com/daniel5151/ts7200/) - Emulator for the TS-7200 SoC (ARMv4T)
157- [vaporstation](https://github.com/Colin-Suckow/vaporstation) - A Playstation One emulator (MIP…
158- [microcorruption-emu](https://github.com/sapir/microcorruption-emu) - Emulator for the microco…
159 - Other
160 - [probe-rs](https://probe.rs/) - A modern, embedded debugging toolkit
161- [udbserver](https://github.com/bet4it/udbserver) - Plug-in GDB debugging for the [Unicorn Engi…
162- [enarx](https://github.com/enarx/enarx) - An open source framework for running applications in…
163- [icicle-emu](https://github.com/icicle-emu/icicle-emu) - An experimental fuzzing-specific, mul…
165 ### In-tree "Toy" Examples
169 - `armv4t` - `./examples/armv4t/`
170 - An incredibly simple ARMv4T-based system emulator with `gdbstub` support.
171- **Implements (almost) all available `target::ext` features.** This makes it a great resource whe…
172 - `armv4t_multicore` - `./examples/armv4t_multicore/`
173 - A dual-core variation of the `armv4t` example.
174 - Implements the core of `gdbstub`'s multithread extensions API, but not much else.
175 - `example_no_std` - `./example_no_std`
176- An _extremely_ minimal example which shows off how `gdbstub` can be used in a `#![no_std]` proje…
177- Unlike the `armv4t/armv4t_multicore` examples, this project does _not_ include a working emulato…
178- Doubles as a test-bed for tracking `gdbstub`'s approximate binary footprint (via the `check_size…
184-party unsafe code, `gdbstub` comes with an opt-in `paranoid_unsafe` feature, which enables `#![fo…
188 - With `default` features
189 - Don't emit provably unreachable panics
190- `src/protocol/packet.rs`: Method in `PacketBuf` that use index using stored sub-`Range<usize>`…
191 - `src/protocol/common/hex.rs`: `decode_hex_buf`
193 - When the `std` feature is enabled:
194- `src/connection/impls/unixstream.rs`: An implementation of `UnixStream::peek` which uses `libc…
197 ## Writing panic-free code
199 Ideally, the Rust compiler would have some way to opt-in to a strict "no-panic" mode. Unfortunately…
205 - Panic infrastructure can be _expensive_, and when you're optimizing for embedded, `no_std` use-ca…
206 - `gdbstub` can be used to implement low-level debuggers, and if the debugger itself panics, well..…
211- \*subject to the specific `rustc` version being used (codegen and optimization vary between vers…
212 - \*different hardware architectures may be subject to different compiler optimizations
213 - i.e: at this time, only `x86` is actively tested to be panic-free
215 - LLVM is unable to omit certain `panic` checks without requiring a bit of `unsafe` code
216 - See the [`unsafe` in `gdbstub`](#unsafe-in-gdbstub) section for more details
218 - _Note:_ The arch implementations under `gdbstub_arch` are _not_ guaranteed to be panic free!
219 - If you do spot a panicking arch in `gdbstub_arch`, consider opening a PR to fix it
221 If you're using `gdbstub` in a no-panic project and have determined that `gdbstub` is at fault for …
229 - [ ] Allow fine-grained control over target features via the `Arch` trait ([\#12](https://github…
230 - [ ] Implement GDB's various high-level operating modes:
231 - [x] Single/Multi Thread debugging
232 - [ ] Multiprocess Debugging ([\#124](https://github.com/daniel5151/gdbstub/issues/124)
233 - [ ] Requires adding a new `target::ext::base::multiprocess` API.
234- _Note:_ `gdbstub` already implements multiprocess extensions "under-the-hood", and just hard-c…
235- [x] [Extended Mode](https://sourceware.org/gdb/current/onlinedocs/gdb/Connecting.html) (`targe…
236- [ ] [Non-Stop Mode](https://sourceware.org/gdb/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-
237 - [x] Have a working example of `gdbstub` running in a "bare-metal" `#![no_std]` environment.
241 - [ ] Should `gdbstub` commit to a MSRV?
242 - [ ] Remove lingering instances of `RawRegId` from `gdbstub_arch` ([\#29](https://github.com/dan…
243 - [x] Exposing `async/await` interfaces (particularly wrt. handling GDB client interrupts) ([\#36…
244 - [ ] How/if to support [LLDB extensions](https://raw.githubusercontent.com/llvm-mirror/lldb/mast…
245 - [ ] Supporting multi-arch debugging via a single target
246 - e.g: debugging x86 and ARM processes on macOS
247 - [ ] Proper handling of "nack" packets (for spotty connections) ([\#137](https://github.com/dani…
251 gdbstub is free and open source! All code in this repository is dual-licensed under either:
253 * MIT License ([LICENSE-MIT](docs/LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opens…
254 …sion 2.0 ([LICENSE-APACHE](docs/LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](ht…
256 …. This means you can select the license you prefer! This dual-licensing approach is the de-facto s…
258 …ionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be…