Skip to content

Commit

Permalink
Rename debugger type to avoid conflicting with proper "gdb"
Browse files Browse the repository at this point in the history
  • Loading branch information
nberth committed Dec 16, 2024
1 parent 12fcf1e commit eb434cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
],
"debuggers": [
{
"type": "gdb",
"type": "superbol-gdb",
"languages": ["cobol", "COBOL"],
"program": "./out/src/gdb.js",
"runtime": "node",
Expand Down Expand Up @@ -187,7 +187,7 @@
"description": "New SuperBOL launch request",
"body": {
"name": "${2:SuperBOL: debug launch}",
"type": "gdb",
"type": "superbol-gdb",
"request": "launch",
"target": "$${_:{file}}",
"arguments": "",
Expand All @@ -203,7 +203,7 @@
"description": "New SuperBOL attach local request",
"body": {
"name": "${2:SuperBOL: debug attach local}",
"type": "gdb",
"type": "superbol-gdb",
"request": "attach",
"pid": "${3:0}",
"target": "$${_:{file}}",
Expand All @@ -218,7 +218,7 @@
"description": "New SuperBOL attach remote request",
"body": {
"name": "${2:SuperBOL: debug attach remote}",
"type": "gdb",
"type": "superbol-gdb",
"request": "attach",
"remoteDebugger": "${3:host:port}",
"target": "$${_:{file}}",
Expand Down
16 changes: 8 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export function activate(context: vscode.ExtensionContext) {
const provider = new GdbConfigurationProvider();
const factory = new GdbAdapterDescriptorFactory(new CoverageStatus(), new GDBDebugSession());
context.subscriptions.push(
vscode.debug.registerDebugConfigurationProvider('gdb', provider),
vscode.debug.registerDebugAdapterDescriptorFactory('gdb', factory, vscode.DebugConfigurationProviderTriggerKind.Dynamic),
vscode.debug.registerDebugConfigurationProvider('superbol-gdb', provider),
vscode.debug.registerDebugAdapterDescriptorFactory('superbol-gdb', factory, vscode.DebugConfigurationProviderTriggerKind.Dynamic),
vscode.languages.registerEvaluatableExpressionProvider('GnuCOBOL', new GnuCOBOLEvalExpressionFactory()),
vscode.languages.registerEvaluatableExpressionProvider('GnuCOBOL31', new GnuCOBOLEvalExpressionFactory()),
vscode.languages.registerEvaluatableExpressionProvider('GnuCOBOL3.1', new GnuCOBOLEvalExpressionFactory()),
Expand All @@ -29,14 +29,14 @@ export function deactivate() {
}

class GdbConfigurationProvider implements vscode.DebugConfigurationProvider {
resolveDebugConfiguration(_folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, _token?: vscode.CancellationToken): vscode.ProviderResult<vscode.DebugConfiguration> {
public resolveDebugConfiguration(_folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, _token?: vscode.CancellationToken): vscode.ProviderResult<vscode.DebugConfiguration> {
config.gdbargs = ["-q", "--interpreter=mi2"];
const settings = new DebuggerSettings();
if (config.name === undefined) {
config.name = "SuperBOL: default debug";
}
if (config.type === undefined) {
config.type = "gdb";
config.type = "superbol-gdb";
}
if (config.request === undefined) {
config.request = "launch";
Expand Down Expand Up @@ -79,13 +79,13 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider {
return config;
}

provideDebugConfigurations(
public provideDebugConfigurations(
_folder: vscode.WorkspaceFolder,
_token?: vscode.CancellationToken):
vscode.ProviderResult<vscode.DebugConfiguration[]> {
const launchConfigDefault: vscode.DebugConfiguration = {
name: "SuperBOL: debug (launch)",
type: "gdb",
type: "superbol-gdb",
request: "launch",
preLaunchTask: "SuperBOL: build (debug)",
target: "${file}",
Expand All @@ -99,7 +99,7 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider {

const attachLocalConfiguration: vscode.DebugConfiguration = {
name: "SuperBOL: debug (attach local)",
type: "gdb",
type: "superbol-gdb",
request: "attach",
pid: "${input:pid}",
target: "${file}",
Expand All @@ -111,7 +111,7 @@ class GdbConfigurationProvider implements vscode.DebugConfigurationProvider {

const attachRemoteConfiguration: vscode.DebugConfiguration = {
name: "SuperBOL: debug (attach remote)",
type: "gdb",
type: "superbol-gdb",
request: "attach",
"remote-debugger": "${input:remote-debugger}",
target: "${file}",
Expand Down

0 comments on commit eb434cb

Please sign in to comment.