Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gcc][GUI] Fix indentations for gcc fn calls bug reports #4182

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions web/server/vue-cli/e2e/specs/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ module.exports = {
reportPage.expect.element("@overlay").to.be.visible.before(5000);

dateDialog
.pause(100)
.click("@date")
.pause(100)
.click("@ok");

reportPage.expect.element("@overlay").to.not.be.present.before(5000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,50 @@ function getHighlightData(stack, step) {
}
}

if (extractFuncName("Calling ")) {
function extractFuncNameCallingGcc() {
// Msg is structured like
// returning to ‘dprintf_formatf’ from ‘dprintf_Pass1’
// Notice the weird apostrophe.
const callingStr = "calling ";
if (!msg.startsWith(callingStr))
return false;

const idx = msg.indexOf(" from");
if (idx === -1)
return false;

msg = msg.substr(0, idx).replace(callingStr, "").slice(1, -1);
return true;
}

function extractFuncNameReturningToGcc() {
// Msg is structured like
// calling ‘dprintf_Pass1’ from ‘dprintf_formatf’
// Notice the weird apostrophe.
const returningStr = "returning to ";
if (!msg.startsWith(returningStr))
return false;

const fromStr = " from ";
const idx = msg.indexOf(fromStr);
if (idx === -1)
return false;

msg = msg.slice(idx + fromStr.length).slice(1, -1);
return true;
}

if (extractFuncName("Calling ") || extractFuncNameCallingGcc()) {
stack.funcStack.push(msg);
stack.bgColor = highlightColours[
stack.funcStack.length % highlightColours.length];

highlight.icon = ReportStepIconType.CALLING;
} else if (msg.startsWith("Entered call from ")) {
} else if (msg.startsWith("Entered call from ") ||
msg.startsWith("entry to ")) {
highlight.icon = ReportStepIconType.ENTERED_CALL;
} else if (extractFuncName("Returning from ")) {
} else if (extractFuncName("Returning from ") ||
extractFuncNameReturningToGcc()) {
if (msg === stack.funcStack[stack.funcStack.length - 1]) {
stack.funcStack.pop();
stack.bgColor = highlightColours[
Expand All @@ -59,7 +94,8 @@ function getHighlightData(stack, step) {
highlight.icon = ReportStepIconType.RETURNING;
} else if (msg.startsWith("Assuming the condition")) {
highlight.icon = ReportStepIconType.ASSUMING_CONDITION;
} else if (msg.startsWith("Assuming")) {
} else if (msg.startsWith("Assuming") ||
msg.startsWith("following ")) {
highlight.icon = ReportStepIconType.ASSUMING;
} else if (msg == "Entering loop body") {
highlight.icon = ReportStepIconType.ENTERING_LOOP_BODY;
Expand Down
Loading