| OLD | NEW |
| 1 package data | 1 package data |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "bufio" | 4 "bufio" |
| 5 "bytes" | 5 "bytes" |
| 6 "fmt" | 6 "fmt" |
| 7 "regexp" | 7 "regexp" |
| 8 "strconv" | 8 "strconv" |
| 9 "strings" | 9 "strings" |
| 10 | 10 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 hasBegun = true | 147 hasBegun = true |
| 148 continue | 148 continue |
| 149 } | 149 } |
| 150 if hasBegun && line == "" { | 150 if hasBegun && line == "" { |
| 151 break | 151 break |
| 152 } | 152 } |
| 153 if !hasBegun { | 153 if !hasBegun { |
| 154 continue | 154 continue |
| 155 } | 155 } |
| 156 | 156 |
| 157 line = strings.Replace(line, "(anonymous namespace)::", "", -1) |
| 158 |
| 157 if match := asanStackTraceLine.FindStringSubmatch(line); match !
= nil { | 159 if match := asanStackTraceLine.FindStringSubmatch(line); match !
= nil { |
| 158 // match[0] is the entire matched portion, [1] is the fu
nction name [2] is the | 160 // match[0] is the entire matched portion, [1] is the fu
nction name [2] is the |
| 159 // "package", [3] is the file name, [4] is the line numb
er | 161 // "package", [3] is the file name, [4] is the line numb
er |
| 160 newFrame := FullStackFrame(match[2], match[3], match[1],
safeParseInt(match[4])) | 162 newFrame := FullStackFrame(match[2], match[3], match[1],
safeParseInt(match[4])) |
| 161 frames = append(frames, newFrame) | 163 frames = append(frames, newFrame) |
| 162 } | 164 } |
| 163 } | 165 } |
| 164 return StackTrace{Frames: frames} | 166 return StackTrace{Frames: frames} |
| 165 } | 167 } |
| 166 | 168 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 182 s := fmt.Sprintf("StackTrace with %d frames:\n", len(st.Frames)) | 184 s := fmt.Sprintf("StackTrace with %d frames:\n", len(st.Frames)) |
| 183 for _, f := range st.Frames { | 185 for _, f := range st.Frames { |
| 184 s += fmt.Sprintf("\t%s\n", f.String()) | 186 s += fmt.Sprintf("\t%s\n", f.String()) |
| 185 } | 187 } |
| 186 return s | 188 return s |
| 187 } | 189 } |
| 188 | 190 |
| 189 func (st *StackTrace) IsEmpty() bool { | 191 func (st *StackTrace) IsEmpty() bool { |
| 190 return len(st.Frames) == 0 | 192 return len(st.Frames) == 0 |
| 191 } | 193 } |
| OLD | NEW |