Skip to content

Commit 7530a45

Browse files
committed
add GetDebugNewSymbol function to control new symbol log output
1 parent bfc4178 commit 7530a45

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

_xtool/llcppsigfetch/parse/cvt.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,9 @@ func (ct *Converter) createBaseField(cursor clang.Cursor) *ast.Field {
732732
typ := cursor.Type()
733733
typeName, typeKind := getTypeDesc(typ)
734734

735-
ct.logf("createBaseField: ProcessType %s TypeKind: %s", typeName, typeKind)
735+
if dbg.GetDebugProcess() {
736+
ct.logf("createBaseField: ProcessType %s TypeKind: %s", typeName, typeKind)
737+
}
736738

737739
field := &ast.Field{
738740
Type: ct.ProcessType(typ),

_xtool/llcppsymg/dbg/debug.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const (
1010
DbgEditSymMap //print user edit sym map info
1111
DbgVisitTop //print visitTop
1212
DbgCollectFuncInfo
13+
DbgNewSymbol
1314
DbgFlagAll = DbgSymbol | DbgParseIsMethod
1415
)
1516

@@ -52,3 +53,11 @@ func SetDebugCollectFuncInfo() {
5253
func GetDebugCollectFuncInfo() bool {
5354
return false&DbgCollectFuncInfo != 0
5455
}
56+
57+
func SetDebugNewSymbol() {
58+
flags |= DbgNewSymbol
59+
}
60+
61+
func GetDebugNewSymbol() bool {
62+
return flags&DbgNewSymbol != 0
63+
}

_xtool/llcppsymg/symbol/symbol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func ReadExistingSymbolTable(fileName string) (map[string]llcppg.SymbolInfo, boo
159159
}
160160

161161
func GenSymbolTableData(commonSymbols []*llcppg.SymbolInfo) ([]byte, error) {
162-
if dbg.GetDebugSymbol() {
162+
if dbg.GetDebugNewSymbol() {
163163
fmt.Println("GenSymbolTableData:generate symbol table without symbol table")
164164
for _, symbol := range commonSymbols {
165165
fmt.Println("new symbol", symbol.Mangle, "-", symbol.CPP, "-", symbol.Go)

0 commit comments

Comments
 (0)