Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Extension/src/LanguageServer/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1362,8 +1362,21 @@ async function handleCrashFileRead(crashDirectory: string, crashFile: string, cr
}
if (lines[crashStackStartLine].startsWith("SIG")) {
signalType = `${lines[crashStackStartLine]}\n`;
signalInfo = `si_code=${lines[crashStackStartLine + 1]}, si_addr=${bucketSignalAddress(lines[crashStackStartLine + 2])}\n`;
crashStackStartLine += 3;
const siCodeRaw: string | undefined = lines[crashStackStartLine + 1];
const siAddrRaw: string | undefined = lines[crashStackStartLine + 2];
const siCode: string = siCodeRaw?.trim() ?? "";
const siAddr: string = siAddrRaw?.trim() ?? "";
const signalInfoParts: string[] = [];
if (siCode.length > 0) {
signalInfoParts.push(`si_code=${siCode}`);
}
if (siAddr.length > 0) {
signalInfoParts.push(`si_addr=${bucketSignalAddress(siAddr)}`);
}
signalInfo = signalInfoParts.length > 0 ? `${signalInfoParts.join(", ")}\n` : "";
// Only advance past the header lines that actually exist so a missing si_code/si_addr
// line does not cause the first stack frame to be skipped.
crashStackStartLine += 1 + (siCodeRaw !== undefined ? 1 : 0) + (siAddrRaw !== undefined ? 1 : 0);
Comment thread
sean-mcmanus marked this conversation as resolved.
} else {
// The signal type may fail to be written.
// Intentionally different from SIGUNKNOWN from cpptools,
Expand Down
Loading