aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/declextract/entity.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-04-14 08:03:22 +0200
committerDmitry Vyukov <dvyukov@google.com>2025-04-15 08:30:57 +0000
commit002170fbae88011602918a0d73675bfdb6fe4200 (patch)
tree49f97d83a242a8b22afca623eb5c336a82500bea /pkg/declextract/entity.go
parentc7e92da6cb06679b04062786481f50e42c585bfc (diff)
pkg/declextract: more precise fileops callback resolution
Use resolved Function references instead of string names for fileops callback resolution. Function names are not unique, a number of callbacks have the same names.
Diffstat (limited to 'pkg/declextract/entity.go')
-rw-r--r--pkg/declextract/entity.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/declextract/entity.go b/pkg/declextract/entity.go
index d52d265f4..d0a309a0f 100644
--- a/pkg/declextract/entity.go
+++ b/pkg/declextract/entity.go
@@ -89,6 +89,17 @@ type FileOps struct {
Mmap string `json:"mmap,omitempty"`
Ioctl string `json:"ioctl,omitempty"`
SourceFile string `json:"source_file,omitempty"`
+
+ *fileOps
+}
+
+type fileOps struct {
+ open *Function
+ read *Function
+ write *Function
+ mmap *Function
+ ioctl *Function
+ ops []*Function // all non-nil callbacks
}
type Ioctl struct {