-
Download a recent Zig release (>= 0.14) from the downloads section and install.
-
Build and run the compiler using
./scripts/run.sh. Don't forget to placemakefilein the procmod directory! -
Test using
zig build test --summary all.
- Debug with
lldb zig-out/bin/bebop -- build --module-name m65 --path ~/Work/IDA/idasdk90/module src/data/6502/ghidra/6502.slaspec
- Dump the IR with
zig build run -- dump-tree src/data/6502/ghidra/6502.slaspec
- Use this to get a short hash for version numbering:
jj log --ignore-working-copy --no-graph -r@- -T'commit_id.short()'
-
Check the vendor toolchain for op codes.
-
Disassemble from the command line:
ida -B -z8 -pnds32 -Lbootloader.log ./bootloader.bin
- Test the disassembly
./scripts/diff-asm.py --ida-asm ~/Downloads/bootloader.bin.asm --nds-asm ~/Downloads/bootloader.asm
- Debug using the GUI
lldb /Applications/IDA\ Professional\ 9.0.app/Contents/MacOS/ida -- -Lbootloader.log
- Conditional breakpoints in lldb:
br s -n '__lwi333' -c 'insn.ip == 0x66'