Skip to content

Commit e2c1810

Browse files
committed
[lldb-dap] update vscode extension
1 parent 6f030c1 commit e2c1810

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

lldb/tools/lldb-dap/src-ts/debug-session-tracker.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ function isEvent(
2525
);
2626
}
2727

28+
export interface LLDBModule extends DebugProtocol.Module {
29+
debugInfoSize?: string;
30+
}
31+
2832
/** Tracks lldb-dap sessions for data visualizers. */
2933
export class DebugSessionTracker
3034
implements vscode.DebugAdapterTrackerFactory, vscode.Disposable
@@ -34,7 +38,7 @@ export class DebugSessionTracker
3438
*
3539
* The modules are kept in an array to maintain the load order of the modules.
3640
*/
37-
private modules = new Map<vscode.DebugSession, DebugProtocol.Module[]>();
41+
private modules = new Map<vscode.DebugSession, LLDBModule[]>();
3842
private modulesChanged = new vscode.EventEmitter<
3943
vscode.DebugSession | undefined
4044
>();
@@ -73,7 +77,7 @@ export class DebugSessionTracker
7377
*
7478
* Modules are returned in load order.
7579
*/
76-
debugSessionModules(session: vscode.DebugSession): DebugProtocol.Module[] {
80+
debugSessionModules(session: vscode.DebugSession): LLDBModule[] {
7781
return this.modules.get(session) ?? [];
7882
}
7983

lldb/tools/lldb-dap/src-ts/ui/modules-data-provider.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as vscode from "vscode";
22
import { DebugProtocol } from "@vscode/debugprotocol";
3-
import { DebugSessionTracker } from "../debug-session-tracker";
3+
import { DebugSessionTracker, LLDBModule } from "../debug-session-tracker";
44

55
export interface ModuleProperty {
66
key: string;
@@ -9,19 +9,19 @@ export interface ModuleProperty {
99

1010
/** Type to represent both Module and ModuleProperty since TreeDataProvider
1111
* expects one concrete type */
12-
type TreeData = DebugProtocol.Module | ModuleProperty;
12+
type TreeData = LLDBModule | ModuleProperty;
1313

14-
function isModule(type: TreeData): type is DebugProtocol.Module {
15-
return (type as DebugProtocol.Module).id !== undefined;
14+
function isModule(type: TreeData): type is LLDBModule {
15+
return (type as LLDBModule).id !== undefined;
1616
}
1717

1818
class ModuleItem extends vscode.TreeItem {
19-
constructor(module: DebugProtocol.Module) {
19+
constructor(module: LLDBModule) {
2020
super(module.name, vscode.TreeItemCollapsibleState.Collapsed);
2121
this.description = module.symbolStatus;
2222
}
2323

24-
static getProperties(module: DebugProtocol.Module): ModuleProperty[] {
24+
static getProperties(module: LLDBModule): ModuleProperty[] {
2525
// does not include the name and symbol status as it is show in the parent.
2626
let children: ModuleProperty[] = [];
2727
children.push({ key: "id:", value: module.id.toString() });
@@ -41,6 +41,9 @@ class ModuleItem extends vscode.TreeItem {
4141
if (module.symbolFilePath) {
4242
children.push({ key: "symbol filepath:", value: module.symbolFilePath });
4343
}
44+
if (module.debugInfoSize) {
45+
children.push({ key: "debuginfo size: ", value: module.debugInfoSize });
46+
}
4447
return children;
4548
}
4649
}

0 commit comments

Comments
 (0)