7 Commits

Author SHA1 Message Date
Alessandro Arzilli
efcc1fe030
lru: remove mutex from lru cache (#4226)
We only use the lru cache in contexts that are non-thread reentrant,
regardless. The mutex is superfluous (it was originally introduced by a
dependency update, originally the code used simplelru which did not
have a mutex).
2026-01-07 13:11:12 +01:00
Derek Parker
7f42ac8564
*: modernize codebase (#4221)
Run go run
golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest
-fix -test ./... on the codebase now that the module version has updated
to 1.24.
2025-12-21 15:33:54 +01:00
Quim Muntal
867c71b0f7
*: replace github.com/hashicorp/golang-lru with a custom lru cache (#4196)
* replace github.com/hashicorp/golang-lru with a custom lru cache

* fix caplocks

* use a mutex instead of rwmutex

* add lrucache tests

* move lru to its own package
2025-11-25 14:21:26 -05:00
Derek Parker
61573cffb3
*: modernize codebase with newer syntax / helpers (#4110)
Changes came from running
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
on the codebase.
2025-08-29 15:50:08 +02:00
Oleksandr Redko
7a801c440b
*: remove redundant lines at the start/end of block (#3773) 2024-07-11 13:54:55 +02:00
Derek Parker
6e8e1cee9b
pkg/proc: use gore to obtain info from stripped binaries (#3577)
This patch switches from using a forked version of one of the libraries
of goretk/gore to using the module directly. This is possible now that
certain functionality has been exposed / fixed within that module making
it usable for Delve.
2023-11-23 09:12:10 +01:00
Derek Parker
6c77c35586
pkg/proc: add inline function support for stripped binaries (#3549)
This patch adds support for listing and setting breakpoints on inlined functions within stripped binaries. It uses a forked version of `debug/gosym` copied from golang.org/x/vuln/internal/vulncheck/internal/gosym which adds support for parsing the inline tree of the pclntab section. Parsing this section requires knowing the offset of the "go:func.*" symbol, which is not present in stripped binaries via the ``.symtab` section so instead, we search the `.noptrdata` section which contains `runtime.moduledatap` which contains the value of that missing symbol, which we then can use to find the inline tree for a given function.

Given all this we parse the inline tree for each function we find, and then add that information the the appropriate `Function` contained in `bi.Functions`, using a relatively empty `Function` struct as what would be the abstract origin.
2023-11-03 10:00:49 +01:00