All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
While the overall structure of the API has remained the same, 0.5.0
does introduce a few breaking API changes that require some attention. That being said, it should not be a difficult migration, and updating to 0.5.0
from 0.4
shouldn't take more than 10 mins of refactoring.
Check out transition_guide.md
for guidance on upgrading from 0.4.x
to 0.5
.
kind: Arch::BreakpointKind
parameters to the Breakpoint APIkind
parameter specifies the size of the instruction that should be injected.ResumeAction::{Step,Continue}WithSignal
Exited(u8)
, Terminated(u8)
, and ReplayLog("begin"|"end")
stop reasons.DisconnectReason::Exited(u8)
and DisconnectReason::Terminated(u8)
.MultiThreadOps::resume
API to be significantly more ergonomic and efficient{Single,Multi}ThreadReverse{Step,Continue}
- Support for reverse-step and reverse-continue. #48 (DrChat){Single,Multi}ThreadRangeStepping
- Optional optimized range stepping support.gdbstub::arch
has been moved into a separate gdbstub_arch
crateMultiThreadOps::resume
APIcheck_gdb_interrupt
callback, hiding the underlying implementation details{read,write}_register
) into separate SingleRegisterAccess
trait{Hw,Sw}Breakpoints/Watchpoints
IDETs under a single Breakpoints
IDET + sub-IDETskind: Arch::BreakpointKind
parameter to add_{hw,sw}_breakpoint
methodstarget::ext::extended_mod::ConfigureASLR{Ops}
to ConfigureAslr{Ops}
(clippy::upper_case_acronyms){Step,Continue}WithSignal
variants to target::ext::base::ResumeAction
arch::Arch
: Added type BreakpointKind
. Required to support arch-specific breakpoint kindsarch::Arch
: (very minor) Added num_traits::FromPrimitive
bound to Arch::Usize
arch::Registers
: Added type ProgramCounter
and associated fn pc(&self) -> Self::ProgramCounter
method. Added preemptively in anticipation of future GDB Agent supportHalted
stop reason (more accurate to simply return {Exited|Terminated}(SIGSTOP)
instead).Halted
disconnect reason (replaced with the Exited
and Terminated
stop reasons instead).ExtendedMode
attached PID tracking when alloc
was available. See 23b56038
rationale behind this change.GdbStubImpl
implementation into separate files (by protocol extension)GdbStubImpl::do_vcont
, along with streamlining its interactions with the legacy s
and c
packetsself.current_mem_tid
hack, replacing it with a much more elegant solutionZ
and z
packets with embedded agent bytecode expressionsTargetDescriptionXmlOverride
- Allow targets to override the target description XML file (target.xml
) specified by Target::Arch::target_description_xml
. This is useful in cases where a Target
is expected to be generic over multiple architectures. #43 (with help from DrChat)write!
instead of writeln!
in output!
macro #41RegId
for Mips/Mips64 #38 (starfleetcadet75)RegId
for MSP430 #38 (starfleetcadet75)T06
to S05
,cargo build
fails if cfg-if is 0.1.9 or olderTarget::Arch::Usize
).This version includes a major API overhaul, alongside a slew of new features and general improvements. While updating to 0.4.0
will require some substantial code modifications, it's well worth the effort, as 0.4.0
is the safest, leanest, and most featureful release of gdbstub
yet!
Fun fact: Even after adding a bunch of new features and bug-fixes, the in-tree example_no_std
has remained just as small! The example on the semver-fix-0.2.2
branch is 20251
bytes, while the example on 0.4.0
is 20246
bytes.
Target
API in terms of “Inlineable Dyn Extension Traits” (IDETs)Target
into smaller pieces which can be mixed-and-matched, it not only makes it easier to get up-and-running with gdbstub
, but it also unlocks a lot of awesome internal optimizations:add_sw_breakpoint
and remove_sw_breakpoint
).Target
API with support for non-fatal error handling.std::io::Error
that occur as a result of ExtendedMode
operations. The new TargetResult
/TargetError
result is much more robust, and opens to door to supporting additional error handling extensions (such as LLDB's ASCII Errors).Connection
trait with new methods (flush
- required, write_all
, on_session_start
)Registers::RegId
to Arch::RegId
, and introduce new temporary RegIdImpl
solution for avoiding breaking API changes due to new RegId
implementations (see #29)RegId
enums as #[non_exhaustive]
, allowing more registers to be added if need be.#[non_exhaustive]
.ExtendedMode
- Allow targets to run new processes / attach to existing processes / restart execution.set disable-randomization
, set environment
, set startup-with-shell
, and set cwd
and cd
.SectionOffsets
- Get section/segment relocation offsets from the target. #30 (mchesser)qOffsets
packet under-the-hood.set_nodelay
is set when using a TcpStream
as a Connection
(via the new Connection::on_session_start
API)btou
dependency.UTF-8
aware str
handling code.This version contains a few minor breaking changes from 0.2.1
. These are only surface-level changes, and can be fixed with minimal effort.
Version 0.3.0
is identical to the yanked version 0.2.2
, except that it adheres to cargo
's modified SemVer rule which states that the pre-0.x.y
breaking changes should still bump the minor version.
Thanks to h33p for reporting this issue (#27)
Target::resume
API to replace raw &mut dyn Iterator
with a functionally identical concrete Actions
iterator.StopReason
enum as #[non_exhaustive]
, allowing further types to be added without being considered as an API breaking change.Target::read/write_register
support (to support single register accesses) #22 (thomashk0)StopReason::Signal(u8)
variant, to send arbitrary signal codes #19 (mchesser)Target::resume
Target::read/write_addrs
.start of changelog