From c78a0cfc6fe7b63d57d42254a9f6c5d21ad354e7 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 20 Nov 2016 16:34:17 +1300 Subject: [PATCH] Pass project config from `.debugger.cson` to debugger implementation. This is useful at least for GDB, as different projects are likely to use different GDB binaries (for different target architectures). This should be project specific configuration rather than package configuration. --- lib/debugger-controller.js | 2 +- lib/debugger-proxy.js | 4 ++-- lib/types.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/debugger-controller.js b/lib/debugger-controller.js index 5dcb667..638f596 100644 --- a/lib/debugger-controller.js +++ b/lib/debugger-controller.js @@ -87,7 +87,7 @@ export default class DebuggerController { return } - proxy.startSession(target, debug) + proxy.startSession(target, debug, config.data) } stop(): void { diff --git a/lib/debugger-proxy.js b/lib/debugger-proxy.js index b8e968b..b61192d 100644 --- a/lib/debugger-proxy.js +++ b/lib/debugger-proxy.js @@ -32,7 +32,7 @@ export default class DebuggerProxy { return this.activeDebugger } - startSession(target: DebuggerTarget, debug: Debugger): void { + startSession(target: DebuggerTarget, debug: Debugger, config: Object): void { this.activeSubscriptions.add(debug.onBreakpointEvent(event => { @@ -78,7 +78,7 @@ export default class DebuggerProxy { this.emitter.emit('target', event) })) - debug.start(target, this.breakpoints) + debug.start(target, this.breakpoints, config) this.activeDebugger = debug } diff --git a/lib/types.js b/lib/types.js index 73096a8..a76365b 100644 --- a/lib/types.js +++ b/lib/types.js @@ -30,7 +30,7 @@ export type Debugger = { onTargetEvent(callback: Function): void, - start(target: DebuggerTarget): void, + start(target: DebuggerTarget, config: Object): void, stop(): void,