about summary refs log tree commit diff stats
path: root/subx/028translate.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-10 19:51:20 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-10 20:54:15 -0700
commit8950915a007f78c427f176609678c50ef9923e5b (patch)
treedbe10980201791f98d7ed02944c98d1defec38be /subx/028translate.cc
parent2a15acd51025c9a6e63865b6ba7b3fbbd4bdd802 (diff)
downloadmu-8950915a007f78c427f176609678c50ef9923e5b.tar.gz
4678
A debugging aid: 'subx --map translate' dumps a mapping from functions
to addresses to a file called "map", and 'subx --map run' loads the mapping
in "map", augmenting debug traces.

Let's see how much this helps. Debugging machine code has been pretty painful
lately.
Diffstat (limited to 'subx/028translate.cc')
-rw-r--r--subx/028translate.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/subx/028translate.cc b/subx/028translate.cc
index 38f8a223..48c11786 100644
--- a/subx/028translate.cc
+++ b/subx/028translate.cc
@@ -20,6 +20,7 @@
 if (is_equal(argv[1], "translate")) {
   START_TRACING_UNTIL_END_OF_SCOPE;
   reset();
+  // Begin subx translate
   program p;
   string output_filename;
   for (int i = /*skip 'subx translate'*/2;  i < argc;  ++i) {
@@ -59,6 +60,7 @@ if (is_equal(argv[1], "translate")) {
     unlink(output_filename.c_str());
     return 1;
   }
+  // End subx translate
   return 0;
 }