From 4bca44e5f2a4aa19361b51b7617a21f46f88eef4 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Tue, 3 Jan 2023 16:51:29 -0600 Subject: [PATCH] chore: update to lastest zig --- lib/zig-network | 2 +- src/Packet.zig | 3 +++ src/lib.zig | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/zig-network b/lib/zig-network index caa31ef..a8c4502 160000 --- a/lib/zig-network +++ b/lib/zig-network @@ -1 +1 @@ -Subproject commit caa31ef8783695f0441b1f6812985e6a46b32c96 +Subproject commit a8c45025385884cfc60996a3b94f1f4af9d2888d diff --git a/src/Packet.zig b/src/Packet.zig index 8ad1fa7..9c196fa 100644 --- a/src/Packet.zig +++ b/src/Packet.zig @@ -87,6 +87,9 @@ pub fn parse(self: *Self, allocator: Allocator, emu: Emulator) !String { { var i: u32 = 0; while (i < len) : (i += 1) { + const value = emu.read(addr + i); + log.debug("read 0x{X:0>2} from 0x{X:0>8}", .{ value, addr + i }); + // writes the formatted integer to the buffer, returns a slice to the buffer but we ignore that _ = std.fmt.bufPrintIntToSlice(ret[i * 2 ..][0..2], emu.read(addr + i), 16, .lower, .{ .fill = '0', .width = 2 }); } diff --git a/src/lib.zig b/src/lib.zig index a79f4b7..cb534c0 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -28,31 +28,31 @@ pub const Emulator = struct { pub fn readImpl(pointer: *anyopaque, addr: u32) u8 { const self = @ptrCast(Ptr, @alignCast(alignment, pointer)); - return @call(.{ .modifier = .always_inline }, ptr_info.Pointer.child.read, .{ self, addr }); + return @call(.always_inline, ptr_info.Pointer.child.read, .{ self, addr }); } pub fn writeImpl(pointer: *anyopaque, addr: u32, value: u8) void { const self = @ptrCast(Ptr, @alignCast(alignment, pointer)); - return @call(.{ .modifier = .always_inline }, ptr_info.Pointer.child.write, .{ self, addr, value }); + return @call(.always_inline, ptr_info.Pointer.child.write, .{ self, addr, value }); } pub fn registersImpl(pointer: *anyopaque) *[16]u32 { const self = @ptrCast(Ptr, @alignCast(alignment, pointer)); - return @call(.{ .modifier = .always_inline }, ptr_info.Pointer.child.registers, .{self}); + return @call(.always_inline, ptr_info.Pointer.child.registers, .{self}); } pub fn cpsrImpl(pointer: *anyopaque) u32 { const self = @ptrCast(Ptr, @alignCast(alignment, pointer)); - return @call(.{ .modifier = .always_inline }, ptr_info.Pointer.child.cpsr, .{self}); + return @call(.always_inline, ptr_info.Pointer.child.cpsr, .{self}); } pub fn stepImpl(pointer: *anyopaque) void { const self = @ptrCast(Ptr, @alignCast(alignment, pointer)); - return @call(.{ .modifier = .always_inline }, ptr_info.Pointer.child.step, .{self}); + return @call(.always_inline, ptr_info.Pointer.child.step, .{self}); } };