aboutsummaryrefslogtreecommitdiff
path: root/README.adoc
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-19 01:22:30 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-22 00:01:01 +0100
commitdef3218714ead504ddc1b6a1921f726d8667c8ce (patch)
tree829999402fa4eac2dcc7d2dafaadb58cddd1d1f9 /README.adoc
parent4efc032827f599a6f51bcefbcabb3139174e5ed1 (diff)
downloadbfc-def3218714ead504ddc1b6a1921f726d8667c8ce.tar.gz
bfc-def3218714ead504ddc1b6a1921f726d8667c8ce.tar.xz
bfc-def3218714ead504ddc1b6a1921f726d8667c8ce.zip
gdb-experiment.go: add DWARF debugging information
Now we can debug compiled Brainfuck!
Diffstat (limited to 'README.adoc')
-rw-r--r--README.adoc12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.adoc b/README.adoc
index 5944529..2302dda 100644
--- a/README.adoc
+++ b/README.adoc
@@ -35,6 +35,18 @@ When no input file is specified, standard input is used. Similarly, the default
output filename is `a.out`. After the compilation, the resulting file can be
run on the target platform.
+gdb
+---
+You may have noticed the `gdb-experiment.go` file. It is a non-optimizing
+version of the compiler targeting Linux only that adds DWARF debugging
+information mapping code locations onto lines in the `ir-dump.txt` byproduct
+output file. It's been rewritten in Go since managing all those binary buffers
+required to build the symbol table proved to be too painful in C.
+
+ $ go run gdb-experiment.go [INPUT-FILE] [OUTPUT-FILE]
+
+Use `break *0x4000b7` to get a breakpoint at the first Brainfuck instruction.
+
Contributing and Support
------------------------
Use this project's GitHub to report any bugs, request features, or submit pull