mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Merge pull request #143649 from xisui-MSFT/dev/xisui/different_top_frame
Allow stack frame without source as top stack frame when using disassembly view
This commit is contained in:
commit
7fb18b6633
|
@ -511,7 +511,10 @@ export class Thread implements IThread {
|
|||
|
||||
getTopStackFrame(): IStackFrame | undefined {
|
||||
const callStack = this.getCallStack();
|
||||
const firstAvailableStackFrame = callStack.find(sf => !!(sf && sf.source && sf.source.available && sf.source.presentationHint !== 'deemphasize'));
|
||||
// Allow stack frame without source and with instructionReferencePointer as top stack frame when using disassembly view.
|
||||
const firstAvailableStackFrame = callStack.find(sf => !!(sf &&
|
||||
((this.stoppedDetails?.reason === 'instruction breakpoint' || (this.stoppedDetails?.reason === 'step' && this.lastSteppingGranularity === 'instruction')) && sf.instructionPointerReference) ||
|
||||
(sf.source && sf.source.available && sf.source.presentationHint !== 'deemphasize')));
|
||||
return firstAvailableStackFrame || (callStack.length > 0 ? callStack[0] : undefined);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue