File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export interface SessionStackTrace {
3232 session : GDBTargetDebugSession ;
3333 threadId : number ;
3434 stackFrames : DebugProtocol . StackFrame [ ] ;
35- totalFrames ?: number ;
35+ totalFrames ?: number | undefined ;
3636}
3737
3838export type StackItem = vscode . DebugThread | vscode . DebugStackFrame | undefined ;
@@ -161,7 +161,7 @@ export class GDBTargetDebugTracker {
161161 threadId,
162162 stackFrames : response . body . stackFrames ,
163163 totalFrames : response . body . totalFrames
164- } as SessionStackTrace ;
164+ } ;
165165 this . _onStackTrace . fire ( stackTrace ) ;
166166 }
167167
Original file line number Diff line number Diff line change @@ -131,8 +131,7 @@ export class CpuStates {
131131 if ( ! states ) {
132132 return ;
133133 }
134- const hasValidFrames = stackTrace . totalFrames ;
135- const topFrame = hasValidFrames ? stackTrace . stackFrames [ 0 ] : undefined ;
134+ const topFrame = stackTrace . stackFrames . length > 0 ? stackTrace . stackFrames [ 0 ] : undefined ;
136135 let locationString = '' ;
137136 if ( topFrame ) {
138137 if ( topFrame . instructionPointerReference ) {
You can’t perform that action at this time.
0 commit comments