tryParseHeaderLine method
Try and parse the given line as one of the recognized lines in the header of a non-symbolic stack trace.
Returns whether the line was recognized and parsed successfully.
Implementation
bool tryParseHeaderLine(String line) {
if (line.contains(_headerStartLine)) {
// This is the start of a new non-symbolic stack trace, so reset all the
// stored information to be parsed anew.
_os = null;
_arch = null;
_compressed = null;
_simulated = null;
_isolateStart = null;
_vmStart = null;
return true;
}
RegExpMatch? match = _osArchLineRE.firstMatch(line);
if (match != null) {
_os = match[1]!;
_arch = match[2]!;
_compressed = match[3]! == "yes";
_simulated = match[4]! == "yes";
// The architecture line always proceeds the instructions section line,
// so reset these to null just in case we missed the header line.
_isolateStart = null;
_vmStart = null;
return true;
}
match = _instructionsLineRE.firstMatch(line);
if (match != null) {
_isolateStart = int.parse(match[1]!, radix: 16);
_vmStart = int.parse(match[2]!, radix: 16);
return true;
}
return false;
}