diff options
Diffstat (limited to 'pkg/declextract/declextract.go')
| -rw-r--r-- | pkg/declextract/declextract.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/declextract/declextract.go b/pkg/declextract/declextract.go index 30caeaa2d..4edb6c867 100644 --- a/pkg/declextract/declextract.go +++ b/pkg/declextract/declextract.go @@ -7,6 +7,7 @@ import ( "bytes" "errors" "fmt" + "os" "slices" "strings" @@ -19,8 +20,10 @@ func Run(out *Output, probe *ifaceprobe.Info, syscallRename map[string][]string) probe: probe, syscallRename: syscallRename, structs: make(map[string]*Struct), + funcs: make(map[string]*Function), uniqualizer: make(map[string]int), } + ctx.processFunctions() ctx.processIncludes() ctx.processEnums() ctx.processStructs() @@ -37,6 +40,7 @@ type context struct { probe *ifaceprobe.Info syscallRename map[string][]string // syscall function -> syscall names structs map[string]*Struct + funcs map[string]*Function uniqualizer map[string]int interfaces []*Interface descriptions *bytes.Buffer @@ -47,6 +51,10 @@ func (ctx *context) error(msg string, args ...any) { ctx.errs = append(ctx.errs, fmt.Errorf(msg, args...)) } +func (ctx *context) warn(msg string, args ...any) { + fmt.Fprintf(os.Stderr, msg+"\n", args...) +} + func (ctx *context) processIncludes() { // These additional includes must be at the top, because other kernel headers // are broken and won't compile without these additional ones included first. |
