Skip to content

Commit 222fe84

Browse files
committed
more copilot feedback
Signed-off-by: Jens Reinecke <[email protected]>
1 parent e5ce9b2 commit 222fe84

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/debug-session/gdbtarget-debug-tracker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

3838
export 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

src/features/cpu-states/cpu-states.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)