The null value is the default anyways and we do not need to
output that information and can thereby decrease the filesize a bit
for debugees with many occasions of missing debug information.
return 1;
}
const auto ip = data.resolve(instructionPointer);
- cout << line << ' '
- << ip.moduleIndex << ' ' << ip.functionIndex << ' '
- << ip.fileIndex << ' ' << ip.line << '\n';
+ cout << line << ' ' << ip.moduleIndex;
+ if (ip.functionIndex || ip.fileIndex) {
+ cout << ' ' << ip.functionIndex;
+ if (ip.fileIndex) {
+ cout << ' ' << ip.fileIndex << ' ' << ip.line;
+ }
+ }
+ cout << '\n';
} else {
cout << line << '\n';
}
lineIn >> ip.functionIndex;
lineIn >> ip.fileIndex;
lineIn >> ip.line;
- if (lineIn.bad()) {
- cerr << "failed to parse line: " << line << endl;
- return 1;
- }
data.instructionPointers.push_back(ip);
} else if (mode == '+') {
size_t size = 0;