about summary refs log tree commit diff stats
path: root/subx/001help.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-12-06 23:28:43 -0800
committerKartik Agaram <vc@akkartik.com>2018-12-06 23:28:43 -0800
commite20d5c063661dc63c9b26a3596b75a8ca57c8f79 (patch)
tree55fa5597cd4cce4e798fc04636a427dc01a82a05 /subx/001help.cc
parent780d868502235af69d4dced75439474fa78a8c9a (diff)
downloadmu-e20d5c063661dc63c9b26a3596b75a8ca57c8f79.tar.gz
4857
Clean up the debugging flow, and go over help messages for inconsistencies.
They predate the new Readme, which takes some time to describe the x86
instruction set.
Diffstat (limited to 'subx/001help.cc')
-rw-r--r--subx/001help.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/subx/001help.cc b/subx/001help.cc
index 5f90abca..8d815be5 100644
--- a/subx/001help.cc
+++ b/subx/001help.cc
@@ -76,10 +76,19 @@ void init_help() {
     "    subx translate input1.subx intput2.subx ... -o <output ELF binary>\n"
     "- Run a SubX binary using SubX itself (for better error messages):\n"
     "    subx run <ELF binary>\n"
-    "Add '--trace' to any of these commands to also emit a trace, for debugging purposes.\n"
-    "However, options starting with '--' must always come before any other arguments.\n"
     "\n"
-    "To start learning how to write SubX programs, run:\n"
+    "== Debugging aids\n"
+    "- Add '--trace' to any of these commands to print a trace to stderr\n"
+    "  for debugging purposes.\n"
+    "- Add '--map' to add information to traces. 'subx --map translate' will save\n"
+    "  (to a file called 'map') the mapping from labels to addresses that it computes\n"
+    "  during translation. This file is then available to 'subx --map --trace run'\n"
+    "  which prints out label names in the trace as it encounters them.\n"
+    "\n"
+    "Options starting with '--' must always come before any other arguments.\n"
+    "\n"
+    "To start learning how to write SubX programs, see Readme.md (particularly\n"
+    "the section on the x86 instruction set) and then run:\n"
     "  subx help\n"
   );
   // End Help Texts