Giter Club home page Giter Club logo

gdb-utilities's Introduction

gdb utilities

A collection of useful gdb snippets picked up here and there:

  • IP address pretty printer
  • Hexdump
  • Dump breakpoints
  • Save and restore breakpoints

Installation

Make sure you have the full version of gdb including python scripting (a lite version is sometimes installed by default):

apt install gdb

Put the following in your .gdbinit:

define esp_source_scripts
source path/to/gdb-utilities/esp_tools.gdb
source path/to/gdb-utilities/stackfuncs.gdb
source path/to/gdb-utilities/dot.gdbinit
end

Usage with cgdb

Define an alias that uses the correct gdb:

alias esp-cgdb='/usr/bin/cgdb -d xtensa-esp32-elf-gdb'

You can then use it as follows:

# First console
idf.py monitor openocd
#Second console
esp-cgdb path/to/build/projectname.elf

Within openocd:

esp_source_scripts
esp_connect
esp_reboot_to_main

Sources

my_pp: https://grim7reaper.rolinh.ch/blog/2014/09/04/pretty-printer-avec-gdb/

xxd: https://stackoverflow.com/questions/9233095/memory-dump-formatted-like-xxd-from-gdb

dump_breaks: https://prograide.com/pregunta/17550/obtenir-le-gdb-pour-enregistrer-une-liste-de-points-darrt

bsave/brestore : https://stackoverflow.com/questions/501486/getting-gdb-to-save-a-list-of-breakpoints

gdb-utilities's People

Contributors

dbahrdt avatar jordanauge avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.