Skip to content

Arcxm/bfdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bfdb

bfdb is a cli debugger for brainfuck similar to gdb.

Quick Start

Clone the repo and use make to build.

$ make
$ ./bfdb example.bf

Error checks

bfdb has both compile-time checks (e.g. mismatching [ and ]) and run-time checks (e.g. decrementing the data pointer below 0).

Commands

A more detailed list with examples can be found here.

List of commands:

(h)elp -- Print this help.
(q)uit -- Exit debugger.
(f)ile <filename> -- Use file.
(r)un -- Start execution.
(n)ext [count = 1] -- Steps instructions.
(j)ump <instr_index> -- Jumps to an instruction.
(c)ontinue -- Continue execution.
(d)ataptr [ptr] -- Prints or sets the data pointer.
(p)rint [index = $ptr] -- Print cell.
(t)ape -- View the tape around the data pointer.
(s)et <value> -- Sets the value of the current cell.