diff options
| author | blasty <blasty@local> | 2026-07-11 22:58:52 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-11 22:58:52 +0200 |
| commit | 17b8c95b948d4fe2d38cac4f80ffa8fb0a750d4f (patch) | |
| tree | 4f4fb7e6cded481ce23f0319df7cf2433930bd5e /systemd | |
| parent | docs: add README (diff) | |
| download | ida-tui-17b8c95b948d4fe2d38cac4f80ffa8fb0a750d4f.tar.gz ida-tui-17b8c95b948d4fe2d38cac4f80ffa8fb0a750d4f.tar.xz ida-tui-17b8c95b948d4fe2d38cac4f80ffa8fb0a750d4f.zip | |
disasm: render opcode bytes (toggle 'o'), padded to widest insn
Fetch per-instruction opcode bytes alongside the disasm listing and show
them in a column between the address and the mnemonic. Instruction length
comes from consecutive addresses (variable-length safe: x86 movabs shows
its full 10 bytes); the block over-fetches one instruction for the last
line's boundary, falling back to the function end for the final insn.
The column pads to the widest instruction across the whole function:
_fetch_block tracks a running max, and on load a background scan_bytes()
settles a stable width so padding doesn't jump as blocks stream in.
_op_field is shared by the rendered strip, _line_plain, and search _fmt
so cursor/match offsets stay aligned. 'o' toggles the column.
Diffstat (limited to 'systemd')
| -rw-r--r-- | systemd/idatui-mcp.service | 34 | ||||
| -rwxr-xr-x | systemd/install.sh | 23 |
2 files changed, 57 insertions, 0 deletions
diff --git a/systemd/idatui-mcp.service b/systemd/idatui-mcp.service new file mode 100644 index 0000000..9afcb73 --- /dev/null +++ b/systemd/idatui-mcp.service @@ -0,0 +1,34 @@ +[Unit] +Description=idatui ida-pro-mcp supervisor (idalib-mcp on 127.0.0.1:8745) +Documentation=https://github.com/mrexodia/ida-pro-mcp +# Wait for network in case a worker ever needs to resolve/pull anything. +After=network-online.target +Wants=network-online.target +# If it dies >5 times in 60s, stop flapping and surface a hard failure. +StartLimitIntervalSec=60 +StartLimitBurst=5 + +[Service] +Type=simple +WorkingDirectory=%h/dev/ida-tui-maybe +ExecStart=%h/dev/ida-tui-maybe/spawn.sh + +# Be explicit about PATH so the unit doesn't depend on an interactive login +# shell. %h/.local/bin is where `idalib-mcp` lives (uv tool install); uv itself +# and /usr/bin/python are on the system PATH. +Environment=PATH=%h/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +# Tunables (override with a drop-in: systemctl --user edit idatui-mcp). +Environment=IDA_MCP_MAX_WORKERS=8 +Environment=IDA_MCP_HOST=127.0.0.1 +Environment=IDA_MCP_PORT=8745 + +# Always bring it back; observe restarts/exits in `journalctl --user -u idatui-mcp`. +Restart=always +RestartSec=2 + +# Give the supervisor time to shut its workers down cleanly. +TimeoutStopSec=30 +KillMode=mixed + +[Install] +WantedBy=default.target diff --git a/systemd/install.sh b/systemd/install.sh new file mode 100755 index 0000000..0a118b7 --- /dev/null +++ b/systemd/install.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Install & enable the idatui-mcp user service. Re-run after editing the unit. +set -eu + +UNIT=idatui-mcp.service +SRC=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/$UNIT +DEST_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user" + +mkdir -p "$DEST_DIR" +ln -sf "$SRC" "$DEST_DIR/$UNIT" + +# Keep the service alive after logout / across reboots without a login session. +loginctl enable-linger "$(id -un)" || true + +systemctl --user daemon-reload +systemctl --user enable --now "$UNIT" + +echo +echo "Installed. Handy commands:" +echo " systemctl --user status idatui-mcp" +echo " systemctl --user restart idatui-mcp" +echo " journalctl --user -u idatui-mcp -f" +echo " systemctl --user edit idatui-mcp # drop-in overrides (ports, workers)" |
