From 8a381d71cfc6412cd8e9f6e0b2cb0546ba1b776e Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 19 Apr 2026 12:39:14 +0200 Subject: [PATCH] add objdump just recipe --- flake.nix | 4 ++-- scripts/nixos.just | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3415d28..724bb5f 100644 --- a/flake.nix +++ b/flake.nix @@ -477,8 +477,8 @@ rec { # Dynamic libraries from buildinputs: # LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; - JUST_WORKING_DIRECTORY = "./"; - JUST_JUSTFILE = "./scripts/nixos.just"; + JUST_WORKING_DIRECTORY = "/home/christoph/Notes/TU/MastersThesis/FailNix"; + JUST_JUSTFILE = "/home/christoph/Notes/TU/MastersThesis/FailNix/scripts/nixos.just"; # Those are read by the justfile FAIL_SHARE = "${fail-bin}/share"; diff --git a/scripts/nixos.just b/scripts/nixos.just index 8833dd7..1c40b73 100644 --- a/scripts/nixos.just +++ b/scripts/nixos.just @@ -106,6 +106,21 @@ gdb module: # -e bin.relocs.apply=true \ # {{ BUILD_DIR }}-{{ module }}/system.elf +[doc("Disassemble with objdump at address")] +[group("debug")] +dump dir addr="0x100000" saddr="0x100100": + objdump {{ dir }}/system.elf \ + --disassemble-all \ + --disassembler-options=intel \ + --disassembler-color=terminal \ + --source \ + --demangle \ + --section=.text \ + --start-address={{ addr }} \ + --stop-address={{ saddr }} \ + --prefix={{ dir }} \ + --prefix-strip=7 + [doc("Launch radare2 at address (interactive)")] [group("debug")] r2i module addr="dbg.os_main":