[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: gud mode in Meadow



Hiroyuki Bessho$B$5$s!"8eF#$5$s!";3ED$5$s!"%"%I%P%$%9$"$j$,$H$&$4$6$$$^$9!#(B

$B3'$5$s$N%"%I%P%$%9$r;29M$KD4$Y$^$7$?$H$3$m!"%=!<%9%3!<%I$,I=<($5$l$J$$(B
$B860x$,$"$kDxEY!"$o$+$j$^$7$?!#(B

Bessho$B$5$s$N$4;XE&$NDL$j!"%G%P%C%0Cf$N%=!<%9%U%!%$%k$N0LCV$O!"(B
gdb$B$+$i(Bgud$B$X!"(B^Z^Zfilename:linenumber$B$H$$$&%U%)!<%^%C%H$G0z$-EO$;$F$$$^$7$?!#(B
$B;d$N>l9g$O!"(B
  
  ^Z^Z//k/work/test.c:8

$B$H$$$&$h$&$K$J$C$F$*$j!"4X?t!V(Bgud-gdb-marker-filter$B!W$G!"%=!<%9%U%!%$%kL>$H(B
$B$7$F@Z$j=P$5$l$?$b$N$O!"(B

   //k/work/test.c

$B$N$h$&$K$J$j!"%I%i%$%VL>$r<($9$N$K(B//$B$,;H$o$l$F$$$^$9!#(B
$B!J(Bgud-gdb-marker-filter$B$G$O!"%I%i%$%VL>!'%U%!%$%kL>$N%U%)!<%^%C%H$r2>Dj$7$F(B
  $B$$$k$h$&$J5$$,$7$^$9!#!K(B

$B$H$3$m$,!"(Bgud.el$BCf$N%U%!%$%k$N4X?t!V(Bgud-find-file$B!W$G$O!"(B

(defun gud-find-file (file)
  ;; Don't get confused by double slashes in the name that comes from GDB.
  (while (string-match "//+" file)
    (setq file (replace-match "/" t t file)))
  (funcall gud-find-file file))

$B$N$h$&$K$7$F!"(B//$B$r(B/$B$KCV49$7$F$$$k$N$G!"%=!<%9%U%!%$%kL>$O!"(B

  /k/work/test.c

$B$K$J$j!"$3$l$,!"4X?t!V(Bexpand-file-name$B!W$G(B

  k:/k/work/test.c

$B$N$h$&$K$J$j!"K\Ev$O!"(BK:/work/test.c$B$J$N$K!"(Bk:/k/work/test.c$B$H$7$F!"(B
$B%=!<%9%U%!%$%k$,8F$S=P$5$l$?$?$a!"I=<($5$l$J$+$C$?$h$&$G$9!#(B

$B$5$F!"$3$NBP:v$J$N$G$9$,!"8eF#$5$s!";3ED$5$s$,;XDj$5$l$F$$$k$h$&$K!"(B

$BJQ?t(B
(defvar gud-gdb-marker-regexp
  ;; This used to use path-separator instead of ":";
  ;; however, we found that on both Windows 32 and MSDOS
  ;; a colon is correct here.
  (concat "\032\032\\(.:?[^" ":" "\n]*\\)" ":"
	  "\\([0-9]*\\)" ":" ".*\n"))

$B$H4X?t!V(Bgud-gdb-marker-filter$B!W$r=$@5$9$k$N$,NI$$$N$G$7$g$&$,!":#0l$D(B
$B$3$N4X?t$N=hM}$,M}2r$G$-$J$+$C$?$N$G!":,K\E*$J2r7hJ}K!$G$O$"$j$^$;$s$,!"(B
$B<h$j$"$($:!"4X?t!V(Bgud-find-file$B!W$r0J2<$N$h$&$K=$@5$7$F!"%=!<%9%3!<%I$,(B
$BI=<($G$-$k$h$&$K$7$F$7$^$$$^$7$?!#(B

(defun gud-find-file (file)
  (if (eq (string-match "//\\([a-zA-Z]\\)" file) 0)
    (setq file (replace-match "\\1:" t nil file))
    (while (string-match "//+" file)
      (setq file (replace-match "/" t t file)))
    )
  (funcall gud-find-file file))  


$B0J>e!"Js9p$^$G!#(B

-- 
===============================================================================
 Masaki Kochiya  Sony Corporation	         E-Mail:kochiya@xxxxxxxxxxxxx
-------------------------------------------------------------------------------