All Projects → mborgerson → Gdbstub

mborgerson / Gdbstub

Licence: mit
A simple, dependency-free GDB stub that can be easily dropped in to your project.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Gdbstub

EmbeddedTools
Additions to the model-based DSL for deploying Java and Native projects to remote targets
Stars: ✭ 14 (-75%)
Mutual labels:  embedded, tools
solidus dev support
A collection of tools for developing Solidus extensions.
Stars: ✭ 14 (-75%)
Mutual labels:  development, tools
go-getting-started
Develop Go Apps in Kubernetes with Okteto
Stars: ✭ 32 (-42.86%)
Mutual labels:  development, debug
rebuild
Zero-dependency, reproducible build environments
Stars: ✭ 48 (-14.29%)
Mutual labels:  development, embedded
Platformio Core
PlatformIO is a professional collaborative platform for embedded development 👽 A place where Developers and Teams have true Freedom! No more vendor lock-in!
Stars: ✭ 5,539 (+9791.07%)
Mutual labels:  embedded, debug
how-to-qemu-arm-gdb-gtest
How to run, debug, and unit test ARM code on X86 ubuntu
Stars: ✭ 19 (-66.07%)
Mutual labels:  gdb, debug
vistir
Setup / utilities which most projects eventually need
Stars: ✭ 30 (-46.43%)
Mutual labels:  development, tools
flutter ume
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance
Stars: ✭ 1,792 (+3100%)
Mutual labels:  development, debug
Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (+707.14%)
Mutual labels:  tools, development
Pylane
An python vm injector with debug tools, based on gdb.
Stars: ✭ 282 (+403.57%)
Mutual labels:  debug, gdb
ducky
Chrome extension to overlay a (super adorable) rubber duck, as a virtual companion during rubber duck debugging.
Stars: ✭ 80 (+42.86%)
Mutual labels:  development, debug
Micro Dev
The development environment for `micro`
Stars: ✭ 630 (+1025%)
Mutual labels:  tools, development
winston-dev-console
Winston@3 console format aimed to improve development UX
Stars: ✭ 88 (+57.14%)
Mutual labels:  development, debug
bigbug
Easy Microcontroller Debugging Tool
Stars: ✭ 37 (-33.93%)
Mutual labels:  embedded, debug
CVIP
C/C++/Golang/Linux...知识整理
Stars: ✭ 62 (+10.71%)
Mutual labels:  gdb, debug
gdbstub
An ergonomic and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust, with full no_std support.
Stars: ✭ 158 (+182.14%)
Mutual labels:  embedded, gdb
Daplink
Stars: ✭ 1,162 (+1975%)
Mutual labels:  embedded, debug
gdbundle
Minimalist plugin manager for GDB and LLDB
Stars: ✭ 72 (+28.57%)
Mutual labels:  gdb, debug
Stlink
Open source STM32 MCU programming toolset
Stars: ✭ 3,158 (+5539.29%)
Mutual labels:  embedded, gdb
Pyocd
Open source Python library for programming and debugging Arm Cortex-M microcontrollers
Stars: ✭ 550 (+882.14%)
Mutual labels:  embedded, debug

gdbstub

This is a simple GDB stub that can be easily dropped in to your project to allow you to debug a target platform using GDB (or another application which supports remote GDB targets). It has no library dependencies (such as libc) and requires just standard tools to build.

Protocol

Communication between the stub and the debugger takes place via the GDB Remote Serial Protocol.

Porting

This was developed for x86 systems, but it's fairly modular. With a little effort, it can be easily ported to other platforms. You will need to modify gdbstub_sys.h and gdbstub_sys.c to fit your platform's needs accordingly.

Building

Running make produces ELF binary gdbstub.elf with an entry point (dbg_start) that will simply hook the current IDT (to support debug interrupts) and break.

Additionally, a simple flat binary gdbstub.bin is created from the ELF binary. The intent for this flat binary is to be trivially loaded and jumped to.

Demo

In demo/demo.c there is a simple function that's used for demonstration and testing. To test the GDB stub out, you can launch an instance of the full-system emulator QEMU as follows:

qemu-system-i386 -serial tcp:127.0.0.1:1234,server -display none -kernel gdbstub.elf

This will launch QEMU, create a virtual machine with a virtual serial port that can be connected to through local TCP port 1234, then load and run the stub executable inside the virtual machine.

You can then launch your local GDB client with the demo.gdbinit script to get your GDB client to connect to the virtual serial port and begin debugging the demo application:

gdb --command=demo/demo.gdbinit

For example, step a couple of times and print out the value of x:

(gdb) s 2
(gdb) p/x x
$1 = 0xdeadbeef

License

This software is published under the terms of the MIT License. See LICENSE.txt for full license.

Matt Borgerson, 2016-2019

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].