Skip to content

Instantly share code, notes, and snippets.

@via
Created July 13, 2019 13:56
Show Gist options
  • Save via/ff9b7e39b183feb41e731150fb5b6b63 to your computer and use it in GitHub Desktop.
Save via/ff9b7e39b183feb41e731150fb5b6b63 to your computer and use it in GitHub Desktop.
Breakpoint 1, console.Console.process (self=0x7fffffffdda0) at console.zig:23
23 self.outstream.reset();
(gdb) n
24 self.outstream.stream.print("rpm: {}\n", c_tfi.config.decoder.rpm) catch unreachable;
(gdb) print self.outstream
$4 = {stream = {writeFn = 0x20b7d0 <std.io.SliceOutStream.writeFn>}, pos = 0, slice = {ptr = 0x7fffffffd938 "`\334\377\377\377\177", len = 1024}}
(gdb) n
25 self.outstream.stream.print("fueling_us: {}\n", c_tfi.calculated_values.fueling_us) catch unreachable;
(gdb) print self.outstream
$5 = {stream = {writeFn = 0x20b7d0 <std.io.SliceOutStream.writeFn>}, pos = 7, slice = {ptr = 0x7fffffffd938 "rpm: 0\n", len = 1024}}
(gdb) n
27 const output = self.outstream.getWritten();
(gdb) n
28 std.debug.warn("{}", output);
(gdb) print self.outstream
$6 = {stream = {writeFn = 0x20b7d0 <std.io.SliceOutStream.writeFn>}, pos = 21, slice = {ptr = 0x7fffffffd938 "rpm: 0\nf\037", len = 1024}}
(gdb) c
Continuing.
`Üÿÿÿ
0
Breakpoint 1, console.Console.process (self=0x7fffffffdda0) at console.zig:23
23 self.outstream.reset();
(gdb) n
24 self.outstream.stream.print("rpm: {}\n", c_tfi.config.decoder.rpm) catch unreachable;
(gdb)
25 self.outstream.stream.print("fueling_us: {}\n", c_tfi.calculated_values.fueling_us) catch unreachable;
(gdb)
27 const output = self.outstream.getWritten();
(gdb) print self.outstream
$7 = {stream = {writeFn = 0x20b7d0 <std.io.SliceOutStream.writeFn>}, pos = 21, slice = {ptr = 0x7fffffffd938 "rpm: 0\nf\037", len = 1024}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment