Skip to content

Commit

Permalink
add openssl testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
tsingbx committed Dec 13, 2024
1 parent 11e51a4 commit 6e3ed5d
Show file tree
Hide file tree
Showing 7 changed files with 3,864 additions and 11 deletions.
5 changes: 3 additions & 2 deletions _xtool/llcppsigfetch/parse/cvt.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (ct *Converter) visitTop(cursor, parent clang.Cursor) clang.ChildVisitResul
curFile := ct.GetCurFile(cursor)

name := toStr(cursor.String())
ct.logf("visitTop: Cursor: %s\n", name)
ct.logf("visitTop: Cursor: %s, Kind:%s\n", name, clang.GoString(cursor.Kind.String()))

if curFile == nil {
return clang.ChildVisit_Continue
Expand Down Expand Up @@ -469,7 +469,7 @@ func (ct *Converter) ProcessFuncDecl(cursor clang.Cursor) *ast.FuncDecl {
defer ct.decIndent()
name, kind := getCursorDesc(cursor)
mangledName := toStr(cursor.Mangling())
ct.logln("ProcessFuncDecl: CursorName:", name, "CursorKind:", kind)
ct.logln("ProcessFuncDecl: CursorName:", name, "CursorKind:", kind, "FuncType:", clang.GoString(cursor.Type().String()))

// function type will only collect return type
// ProcessType can't get the field names,will collect in follows
Expand Down Expand Up @@ -965,6 +965,7 @@ func buildScopingFromParts(parts []string) ast.Expr {
X: &ast.Ident{Name: part},
}
}

return expr
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/config/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func SigfetchExtract(file string, isTemp bool, isCPP bool, dir string) ([]byte,
return executeSigfetch(args, dir)
}

func SigfetchConfig(configFile string, dir string) ([]byte, error) {
args := []string{configFile}
func SigfetchConfig(configFile string, dir string, args []string) ([]byte, error) {
args = append(args, configFile)
return executeSigfetch(args, dir)
}

Expand Down
9 changes: 9 additions & 0 deletions cmd/gogensig/convert/_testdata/openssl/conf/llcppg.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "libssl",
"include": [
"ssl_core.h"
],
"deps": null,
"trimPrefixes": [],
"cplusplus": false
}
Loading

0 comments on commit 6e3ed5d

Please sign in to comment.