diff options
Diffstat (limited to 'anim/src/calls.zig')
| -rw-r--r-- | anim/src/calls.zig | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/anim/src/calls.zig b/anim/src/calls.zig index e66da1a..0765ce4 100644 --- a/anim/src/calls.zig +++ b/anim/src/calls.zig @@ -153,11 +153,7 @@ pub const Tree = struct { const y = body.y + cm.pad + @as(f32, @floatFromInt(i)) * cm.row; const name = ui.symbol(u, rec.strings.get(frame.pc) orelse u.print("{x}", .{frame.pc})); // The call this frame is, by its place on the chain: its arguments. - const call: ?Recording.Call = if (i < open.len) open[open.len - 1 - i] else null; - const args = if (call) |c| arguments(u, rec, c) else ""; - const line = if (i == 0) rec.own[now.marked()] else rec.lineOf(frame.pc) orelse 0; - const where = if (line > 0 and (i == 0 or rec.lineOf(frame.pc) != null)) u.print("{s}:{d}", .{ rec.file, line }) else ""; - rows.callRow(u, y, box.w, i, name, args, where, i == 0); + rows.callRow(u, y, box.w, i, name, context.callArguments(u, rec, open, i, frame.pc), context.frameWhere(u, rec, now.marked(), i, frame.pc), i == 0); } context.veiled(u, box, now.sprint_veil); } @@ -172,6 +168,8 @@ pub fn arguments(u: ui.Ui, rec: *const Recording, c: Recording.Call) []const u8 if (!f.takes) return ""; const arg = c.arg orelse return ""; const name = if (c.parameter_name) |id| rec.name(id) else f.param; + // A pointer is an address, hex; a number is its decimal. + if (rows.regionOf(rec.moment(c.enter), arg) != .none) return u.print("{s}={x}", .{ name, arg }); return u.print("{s}={d}", .{ name, @as(i64, @bitCast(arg)) }); } |
