From f9eb4021d6b5ec94263a4b6c7d457ed4106b00fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Balv=C3=ADn?= Date: Fri, 21 Aug 2026 00:39:38 +0200 Subject: [PATCH] docs: update CHANGELOG and README for development changes Assisted-by: MiMo V2.5 Pro --- CHANGELOG.md | 39 ++++++++++++++++++++++++++++++++++++++- README.md | 10 +++++----- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 411a098..90126c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,44 @@ Unreleased changes on the `development` branch. ### Added -- +- **Multi-architecture debugger.** `gasm debug` works on arm64, riscv64 + and loong64 in addition to amd64. Each architecture has its own ptrace + register access, disassembler (`golang.org/x/arch`), register display, + and stop-info handler. The REPL is fully arch-neutral. +- **JIT execution trampolines.** `verify.Call` now works on all four + architectures via hand-written assembly trampolines + (`trampoline_{arm64,riscv64,loong64}.s`) that save the Go stack, switch + to a prepared stack, and branch to the JIT function. +- **Hardware watchpoints on all architectures.** arm64 uses DBGWVR/DBGWCR + via `PTRACE_SETREGSET` with `NT_ARM_HW_BREAK`; riscv64 and loong64 use + `PTRACE_POKEUSER` to access trigger/debug registers. +- **LSP: find references** (`textDocument/references`). +- **LSP: rename symbol** (`textDocument/rename`). +- **LSP: document formatting** (`textDocument/formatting`) using the + `format` package for canonical gofmt-style output. +- **LSP: inlay hints** (`textDocument/inlayHint`) — frame size hints after + the TEXT directive's argument area. +- **Lint: `unused-label` rule.** Flags labels that are defined but never + referenced by any jump (Hint severity). +- **Lint: `invalid-textflag` rule.** Flags TEXT/GLOBL flags not in the + known set from `textflag.h` (Warning severity). +- **Lint: `stack-imbalance` rule.** Tracks SP changes and flags if the + net delta at RET does not match the declared frame size. +- **DWARF5 debug sections in ELF output.** All four ELF emitters now emit + `.debug_abbrev`, `.debug_info`, `.debug_line`, and `.debug_line_str` + sections, enabling `addr2line` and GDB/LLDB source-level debugging. + +### Fixed + +- **arm64 BL relocation.** `BL sym(SB)` now records a `RelArm64Branch` + relocation instead of emitting a bare instruction with no relocation. +- **GOOBJ R_ADDRARM64 constant.** Corrected from 9 (`R_CALLARM64`) to 3 + (`R_ADDRARM64`). +- **Cross-package GOOBJ resolution.** `AssembleFileRISCV`, + `AssembleFileLOONG64`, and `AssembleFileARM64` now mark external + relocations and populate `img.Externals`, enabling cross-package symbol + resolution in GOOBJ output. +- **asm help text.** Updated to list arm64 as a supported architecture. ## [0.31.1] — 2026-08-20 diff --git a/README.md b/README.md index 18cdece..8df973a 100644 --- a/README.md +++ b/README.md @@ -81,12 +81,12 @@ cross-compiles the same four targets. | `ast` | The abstract syntax tree. | | `parser` | Line-oriented, error-tolerant parser producing the AST. | | `arch` | amd64, arm64, riscv64 and loong64 register files and instruction tables. | -| `lint` | Conservative static checks. | +| `lint` | Conservative static checks (13 rules including unused-label, invalid-textflag, stack-imbalance). | | `format` | A canonical formatter — `gofmt` for assembly. | -| `asm` | The standalone assembler: amd64, RISC-V and LoongArch encoders, linker, object-file emitters (ELF, GOOBJ). | -| `verify` | JIT execution substrate for dynamic analysis, combined ABI+fuzz differential testing. | -| `debug` | Interactive ptrace debugger with GPR/YMM register display and named buffer allocation. | -| `lsp` | Language Server Protocol server. | +| `asm` | The standalone assembler: all four architecture encoders, linker, object-file emitters (ELF with DWARF5, GOOBJ). | +| `verify` | JIT execution substrate for dynamic analysis, combined ABI+fuzz differential testing. Assembly trampolines for all four architectures. | +| `debug` | Interactive ptrace debugger for all four architectures: single-stepping, breakpoints, hardware watchpoints, register and memory inspection. | +| `lsp` | Language Server Protocol server: completion, hover, symbols, diagnostics, semantic tokens, find references, rename, formatting, inlay hints. | | `cmd/gasm` | The `gasm` binary tying it all together. | | `_gen` | The generator that rebuilds the instruction tables from the Go toolchain. |