Skip to content

Commit ace5af0

Browse files
sstricklCommit Queue
authored andcommitted
[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 <[email protected]> Commit-Queue: Tess Strickland <[email protected]>
1 parent 391212f commit ace5af0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/vm/stack_frame.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,13 @@ const char* StackFrame::ToCString() const {
190190
start = bytecode.PayloadStart();
191191
}
192192
}
193+
#else
194+
UNREACHABLE();
193195
#endif // defined(DART_DYNAMIC_MODULES)
196+
} else if (IsEntryFrame()) {
197+
name = "[Stub] Entry frame";
198+
} else if (IsExitFrame()) {
199+
name = "[Stub] Exit frame";
194200
} else {
195201
const Code& code = Code::Handle(zone, GetCodeObject());
196202
if (code.IsNull()) {

0 commit comments

Comments
 (0)