File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 2929; ; ------------------------------------------------------------------------------------------
3030; ; Package and related things
3131(require 'cl-lib )
32+ (require 'subr-x )
3233(require 'comint )
3334(require 'hydra )
3435
@@ -1280,11 +1281,13 @@ stopped thread before running the command. If FORCE-STOPPED is
12801281
12811282(defun gdb--point-location ()
12821283 " Return a GDB-readable location of the point, in a source file or special buffer."
1283- (cond ((buffer-file-name ) (format " %s :%d " (buffer-file-name ) (gdb--current-line)))
1284- ((gdb--is-buffer-type 'gdb--disassembly )
1285- (let* ((instr (get-text-property (line-beginning-position ) 'gdb--instr ))
1286- (addr (and instr (gdb--disassembly-instr-addr instr))))
1287- (when addr (format " *%s " addr))))))
1284+ (if-let (file-name (buffer-file-name ))
1285+ (format " %s :%d " (or (file-remote-p file-name 'localname ) file-name) (gdb--current-line))
1286+
1287+ (when (gdb--is-buffer-type 'gdb--disassembly )
1288+ (let* ((instr (get-text-property (line-beginning-position ) 'gdb--instr ))
1289+ (addr (and instr (gdb--disassembly-instr-addr instr))))
1290+ (when addr (format " *%s " addr))))))
12881291
12891292(defun gdb--infer-breakpoint (&optional session )
12901293 (cond ((or (buffer-file-name )
You can’t perform that action at this time.
0 commit comments