From ace5af00a369926e72ac8e131e86ac93865eb5fd Mon Sep 17 00:00:00 2001 From: Tess Strickland Date: Fri, 12 Dec 2025 06:44:20 -0800 Subject: [PATCH] [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 Commit-Queue: Tess Strickland --- runtime/vm/stack_frame.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc index f58533ada8f..4912b3c10d6 100644 --- a/runtime/vm/stack_frame.cc +++ b/runtime/vm/stack_frame.cc @@ -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()) {