Giter Club home page Giter Club logo

tug's Introduction

Tug

GDB frontend made with Dear ImGui

image

Tugboat captain is the GDB archer fish mascot https://sourceware.org/gdb/mascot/
Jamie Guinan's original archer fish logo and the vector versions by Andreas Arnez are licensed under CC BY-SA 3.0 US. https://creativecommons.org/licenses/by-sa/3.0/us/

image

Building the Project

  1. Install GLFW3, gcc, and gdb
    Debian: sudo apt-get install libglfw3 libglfw3-dev gcc gdb
    Arch: sudo pacman -S glfw gcc gdb
    Fedora: sudo dnf install glfw glfw-devel gcc gdb

  2. If unable to find GLFW, compile from git repo
    https://github.com/glfw/glfw
    https://www.glfw.org/docs/latest/compile.html
    NOTE: linker flag -lglfw is the shared library, -lglfw3 is the static library

  3. Run command "make DEBUG=0", output in generated build_release directory

Debugging an Executable

NOTE: Tug defaults to the gdb filename returned by the command "which gdb"

  1. run program from command line
    tug --exe [program to debug filename] --gdb [gdb filename]

OR

  1. run tug
  2. click "Debug Program" menu button
  3. fill in gdb filename and debug filename, args are optional
  4. click "Start" button

Source Window

  • CTRL-F: open text search mode, N = next match, SHIFT-N = previous match, ESC to exit
  • CTRL-G: open goto line window, ENTER to jump to input line, ESC to exit
  • hover over any word to query its value, right click it to create a new watch within the control window
  • add/remove breakpoint by clicking the empty column to the left of the line number

Control Window

program execution buttons

  • "---" = jump to next executed line inside source window
  • "|>" = start/continue program
  • "||" = pause program
  • "-->" = step into
  • "/\>" = step over
  • "</\" = step out

GDB Console Command Line

  • repeat last command on hitting enter on an empty line (GDB emulation)
  • cycle command history by pressing up/down arrow while clicked on the box
  • hit tab while typing to see all the autocompletions, hit tab/shift tab to cycle through them

Resources

GDB Machine Interpreter:
https://sourceware.org/gdb/download/onlinedocs/gdb/GDB_002fMI.html#GDB_002fMI

GLFW:
https://www.glfw.org/download.html
https://www.glfw.org/docs/latest/compile.html

tug's People

Contributors

kyle-sylvestre 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.