class
Cradare2::Gdb::Client
- Cradare2::Gdb::Client
- Reference
- Object
Overview
Lightweight, standalone GDB Remote Serial Protocol (RSP) client over TCP. Allows zero-dependency memory querying, register inspection, and hardware canary checks directly against PCSX2, QEMU, or gdbserver without spawning a radare2 process.
Defined in:
cradare2/gdb/client.crConstructors
Class Method Summary
-
.calculate_checksum(payload : String) : UInt8
Computes the 8-bit modulo 256 checksum for a GDB RSP payload.
-
.format_packet(payload : String) : String
Formats a command string into a complete GDB packet with start mark '$' and checksum.
Instance Method Summary
-
#close : Nil
Closes the connection.
-
#connect : Bool
Connects to the remote GDB stub.
-
#connected? : Bool
Returns true if the client socket is active.
- #host : String
- #port : Int32
-
#read_memory(address : UInt64, length : Int32) : Bytes | Nil
Reads memory of
lengthbytes from targetaddress. -
#read_u128(address : UInt64, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : UInt128 | Nil
Reads a 128-bit integer (PS2 EE QWORD) directly from memory.
-
#read_u32(address : UInt64, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : UInt32 | Nil
Reads a 32-bit integer directly from memory.
-
#read_u64(address : UInt64, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : UInt64 | Nil
Reads a 64-bit integer directly from memory.
-
#send_command(payload : String) : String
Sends a command payload and reads the response packet.
- #socket : TCPSocket | Nil
Constructor Detail
Class Method Detail
Computes the 8-bit modulo 256 checksum for a GDB RSP payload.
Formats a command string into a complete GDB packet with start mark '$' and checksum.
Instance Method Detail
Reads memory of length bytes from target address.
Reads a 128-bit integer (PS2 EE QWORD) directly from memory.
Reads a 32-bit integer directly from memory.
Reads a 64-bit integer directly from memory.
Sends a command payload and reads the response packet.