Skip to content

Commit 1934cc3

Browse files
committed
set all DbgFlagAll to 0
1 parent 8d5ac7c commit 1934cc3

File tree

8 files changed

+31
-24
lines changed

8 files changed

+31
-24
lines changed

_xtool/llcppsigfetch/dbg/debug.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const (
1111
DbgGetCurFile
1212
DbgMacro
1313
DbgFileType
14-
DbgFlagAll = DbgParse
14+
DbgFlagAll = 0
1515
)
1616

1717
func SetDebugParse() {

_xtool/llcppsigfetch/llcppsigfetch.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ func main() {
4343
printUsage()
4444
return
4545
}
46-
if ags.VerboseSigfetchParse {
47-
dbg.SetDebugParse()
48-
}
4946
if ags.Verbose {
5047
dbg.SetDebugAll()
5148
}

_xtool/llcppsymg/args/args.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ import (
66
)
77

88
type Args struct {
9-
Help bool
10-
Verbose bool
11-
VerboseSigfetchParse bool //-vsp llcppsigfetch parse.go
12-
VerboseParseIsMethod bool //-vpim
13-
UseStdin bool
14-
CfgFile string
9+
Help bool
10+
Verbose bool
11+
UseStdin bool
12+
CfgFile string
1513
}
1614

1715
func ParseArgs(args []string, defaultCfgFile string, swflags map[string]bool) (*Args, []string) {
@@ -27,12 +25,6 @@ func ParseArgs(args []string, defaultCfgFile string, swflags map[string]bool) (*
2725
case "-v":
2826
result.Verbose = true
2927
continue
30-
case "-vpim":
31-
result.VerboseParseIsMethod = true
32-
continue
33-
case "-vsp":
34-
result.VerboseSigfetchParse = true
35-
continue
3628
case "-":
3729
result.UseStdin = true
3830
continue

_xtool/llcppsymg/dbg/debug.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ const (
1212
DbgCollectFuncInfo
1313
DbgNewSymbol
1414
DbgFileType
15-
DbgFlagAll = DbgSymbol | DbgParseIsMethod
15+
DbgFlagAll = 0
1616
)
1717

18+
func SetDebugAll() {
19+
flags = DbgFlagAll
20+
}
21+
1822
func SetDebugSymbol() {
1923
flags |= DbgSymbol
2024
}

_xtool/llcppsymg/dbg/debug_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,21 @@ func TestSetDebugFileType(t *testing.T) {
129129
})
130130
}
131131
}
132+
133+
func TestSetDebugAll(t *testing.T) {
134+
tests := []struct {
135+
name string
136+
}{
137+
{
138+
name: "TestSetDebugAll",
139+
}
140+
}
141+
for _, tt := range tests {
142+
t.Run(tt.name, func(t *testing.T) {
143+
SetDebugAll()
144+
if dbgFlags != DbgFlagAll {
145+
t.Errorf("dbgFlags = %v, want %v", dbgFlags, DbgFlagAll)
146+
}
147+
})
148+
}
149+
}

_xtool/llcppsymg/llcppsymg.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,8 @@ func main() {
5151
check(err)
5252
defer conf.Delete()
5353

54-
if ags.VerboseParseIsMethod {
55-
dbg.SetDebugParseIsMethod()
56-
}
57-
5854
if ags.Verbose {
59-
dbg.SetDebugSymbol()
55+
dbg.SetDebugAll()
6056
if ags.UseStdin {
6157
fmt.Println("Config From Stdin")
6258
} else {

cmd/gogensig/dbg/debug.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const (
1212
DbgNew
1313
DbgWrite
1414
DbgUnmarshalling
15-
DbgFlagAll = 0 | DbgError | DbgLog
15+
DbgFlagAll = 0
1616
)
1717

1818
func SetDebugSymbolNotFound() {

cmd/gogensig/unmarshal/unmarshal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ func File(data []byte) (ast.Node, error) {
667667
for i, declData := range fileData.Decls {
668668
declNode, err := Node(declData)
669669
if err != nil {
670-
fmt.Fprintf(os.Stderr, "error unmarshalling %d Decl in File: %v\n%s\n", i, err, string(declData))
670+
fmt.Fprintf(os.Stderr, "error unmarshalling %d Decl err: %v\n", i, err)
671671
continue
672672
}
673673
decl, ok := declNode.(ast.Decl)

0 commit comments

Comments
 (0)