Skip to content

Commit

Permalink
Fix strange issue with setting breakpoints in manual disassembly views
Browse files Browse the repository at this point in the history
- VS Code passes the path in a different manner when the view is opened manually - vs when opened automatically because of being passed the view from the debug session. Work around the differences here.
  • Loading branch information
Marus committed Jan 25, 2018
1 parent 06105fd commit e06f789
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,14 @@ export class GDBDebugSession extends DebugSession {
this.breakpointMap.set(args.source.path, []);

let all: Promise<Breakpoint>[] = [];
if (args.source.path.startsWith('disassembly:///')) {
let eidx = args.source.path.indexOf('?');
let path = args.source.path.substring(15, eidx - 6); // Account for protocol and extension
let sourcepath = decodeURIComponent(args.source.path);

if (sourcepath.startsWith('disassembly:/')) {
let sidx = 13;
if (args.source.path.startsWith('disassembly:///')) { sidx = 15; }

let eidx = sourcepath.indexOf('?');
let path = sourcepath.substring(sidx, eidx - 6); // Account for protocol and extension
let parts = path.split('::');
let func: string;
let file: string;
Expand Down

0 comments on commit e06f789

Please sign in to comment.