gdbgui/examples
2020-08-22 19:06:42 -07:00
..
c terminal updates; dashboard rewrite; use tailwind css; other updates (#346) 2020-08-22 19:06:42 -07:00
cpp terminal updates; dashboard rewrite; use tailwind css; other updates (#346) 2020-08-22 19:06:42 -07:00
fortran terminal updates; dashboard rewrite; use tailwind css; other updates (#346) 2020-08-22 19:06:42 -07:00
golang terminal updates; dashboard rewrite; use tailwind css; other updates (#346) 2020-08-22 19:06:42 -07:00
rust Rust example and documentation improvments (#191) 2018-05-07 17:17:31 -07:00
.gitignore improve examples; add go/rust examples 2017-02-28 17:24:47 -08:00
README.md update documentation 2018-01-09 11:38:25 -08:00

Examples

Overview

gdbgui can debug executables generated from various languages. This folder contains example source code and makefiles to build and automatically launch gdbgui.

Clone

To get started, first clone this repository:

git clone https://github.com/cs01/gdbgui.git

Install Dependencies

If you already installed gdbgui with pip, you have all dependencies installed. If not, you need to install them manually:

pip install -r gdbgui/requirements.txt  # run as sudo if this fails

Build Executables and Debug with gdbgui

Enter the directory with the language of your choice in gdbgui/examples/* (c, cpp, rust, golang, fortran), then type make and hit the tab to see the make targets.

For example, in gdbgui/examples/c, running make hello will:

  • build the binary (assuming you have the right compilers and libraries installed)
  • open a new tab in your browser
  • load the executable for the make target you just built
  • insert a breakpoint at main (Rust and Go users may see machine code displayed rather than source code. This is a gdb limitation.)
  • Note: Although the program has loaded, you still must click the run icon to actually begin running the program.