summaryrefslogtreecommitdiff
path: root/src/cli/dbg.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/dbg.zig')
-rw-r--r--src/cli/dbg.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cli/dbg.zig b/src/cli/dbg.zig
index c60bff2..77ca40a 100644
--- a/src/cli/dbg.zig
+++ b/src/cli/dbg.zig
@@ -174,6 +174,12 @@ const Session = struct {
s.view = null;
_ = try if (is(cmd, "step", "s")) s.d.step() else if (is(cmd, "stepi", "si")) s.d.stepi() else s.d.cont();
try s.showStop();
+ } else if (std.mem.eql(u8, cmd, "source-map")) {
+ const from = arg orelse return error.MissingArgument;
+ const to = words.next() orelse return error.MissingArgument;
+ if (words.next() != null) return error.InvalidSourceMap;
+ try s.d.mapSource(from, to);
+ try s.rec.flush();
} else if (is(cmd, "break", "b")) {
const where = arg orelse return error.MissingArgument;
if (std.mem.startsWith(u8, where, "usdt:")) {