SourceViewer
assembly viewing tool (this was a pet project but i found myself actually reaching for it so here i am publishing) the goal is to allow viewing dissasmblies from the perspective of the source file without taking over your compilation setup.

Installation
You can install SourceViewer using Cargo (recommended) or download prebuilt binaries from the Releases page.
Using Cargo
or
Quick Guide
a typical workload would look something like
Source files:
0: "/snap/zig/11625/lib/libc/glibc/csu/elf-init-2.33.c"
1: "/home/user/Desktop/rust_stuff/SourceViewer/sample_code/get_time.c"
2: "/snap/zig/11625/lib/libc/glibc/sysdeps/x86_64/crtn.S"
3: "/snap/zig/11625/lib/libc/glibc/sysdeps/x86_64/crti.S"
4: "/snap/zig/11625/lib/libc/glibc/sysdeps/x86_64/start-2.33.S"
here we looked at the files that composed our binary and then went into the first file to view its contributions.
there are also useful subcommands like "lines" which shows the entire assembly file,
Loading file "sample_code/build/linux_x86_64"
.text
0x010134d0: xor ebp, ebp <unknown> /snap/zig/14333/lib/libc/glibc/sysdeps/x86_64/start-2.33.S:63
0x010134d2: mov r9, rdx <unknown> /snap/zig/14333/lib/libc/glibc/sysdeps/x86_64/start-2.33.S:79
0x010134d5: pop rsi <unknown> /snap/zig/14333/lib/libc/glibc/sysdeps/x86_64/start-2.33.S:85
0x010134d6: mov rdx, rsp <unknown> /snap/zig/14333/lib/libc/glibc/sysdeps/x86_64/start-2.33.S:88
0x010134d9: and rsp, 0xfffffffffffffff0 <unknown> /snap/zig/14333/lib/libc/glibc/sysdeps/x86_64/start-2.33.S:90
...
it can be pumped nicely into less like so
|
Tests
a very good test case is runing
Platforms
this is mostly supported for unix and specifically linux/bsd for 2 reasons:
- dwarf on windows/apple is very anoying
- windows terminals are fairly anoying
we do ship to all platforms but as of now there are issues