The Wayback Machine - https://web.archive.org/web/20230118052732/https://github.com/cs01/gdbgui/tree/master/examples
Skip to content
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
gdbgui/examples/
gdbgui/examples/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
c
 
 
cpp
 
 
 
 
 
 
 
 
 
 
 
 

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.