[vm] Standardize printing of entry/exit frames in StackFrame::ToCString.

For entry/exit frames for compiled code, print that it's an entry or
exit frame like with interpreted code instead of printing the stub name
(with an erroneous offset for exit frames, since the pc of exit frames
is always 0).

While there are two possible stubs for entry frames (InvokeDartCode
vs. InvokeDartCodeFromBytecode), which is in use can be determined
from the preceding exit frame (if any).

TEST=ci (manual testing using --trace-debugger-stacktrace)

Change-Id: I7013e08fbc635f68400c9cdfa97837905121ccf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467860
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This commit is contained in:
Tess Strickland
2025-12-12 06:44:20 -08:00
committed by Commit Queue
parent 391212f3da
commit ace5af00a3
+6
View File
@@ -190,7 +190,13 @@ const char* StackFrame::ToCString() const {
start = bytecode.PayloadStart();
}
}
#else
UNREACHABLE();
#endif // defined(DART_DYNAMIC_MODULES)
} else if (IsEntryFrame()) {
name = "[Stub] Entry frame";
} else if (IsExitFrame()) {
name = "[Stub] Exit frame";
} else {
const Code& code = Code::Handle(zone, GetCodeObject());
if (code.IsNull()) {