Skip to content

Commit af2c223

Browse files
committed
Added DebugLogAll function in sketch mapper
1 parent 2c80ae7 commit af2c223

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: handler/sourcemapper/ino.go

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bufio"
55
"bytes"
66
"fmt"
7+
"log"
78
"sort"
89
"strconv"
910
"strings"
@@ -331,3 +332,13 @@ func dumpInoToCppMap(s map[InoLine]int) {
331332
fmt.Printf("%s:%d -> %d\n", inoLine.File, inoLine.Line, cppLine)
332333
}
333334
}
335+
336+
// DebugLogAll dumps the internal status of the mapper
337+
func (s *InoMapper) DebugLogAll() {
338+
cpp := strings.Split(s.CppText.Text, "\n")
339+
log.Printf(" > Current sketchmapper content:")
340+
for l, cppLine := range cpp {
341+
inoFile, inoLine := s.CppToInoLine(l)
342+
log.Printf(" %3d: %-40s : %s:%d", l, cppLine, inoFile, inoLine)
343+
}
344+
}

0 commit comments

Comments
 (0)