To: vim-dev@vim.org Subject: Patch 6.1.367 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.367 (depends on 6.1.365) Problem: Setting a breakpoint in a function doesn't work. For a sourced file it doesn't work when symbolic links are involved. (Servatius Brandt) Solution: Expand the file name in the same way as do_source() does. Don't prepend the path to a function name. Files: src/ex_cmds2.c *** ../vim61.366/src/ex_cmds2.c Mon Mar 3 20:17:02 2003 --- src/ex_cmds2.c Sat Mar 8 15:13:45 2003 *************** *** 293,298 **** --- 293,299 ---- char_u *arg; { char_u *p = arg; + char_u *q; struct debuggy *bp; if (ga_grow(&dbg_breakp, 1) == FAIL) *************** *** 327,333 **** EMSG2(_(e_invarg2), arg); return FAIL; } ! if ((bp->dbg_name = FullName_save(p, FALSE)) == NULL) return FAIL; return OK; } --- 328,365 ---- EMSG2(_(e_invarg2), arg); return FAIL; } ! ! if (bp->dbg_type == DBG_FUNC) ! bp->dbg_name = vim_strsave(p); ! else ! { ! /* Expand the file name in the same way as do_source(). This means ! * doing it twice, so that $DIR/file gets expanded when $DIR is ! * "~/dir". */ ! #ifdef RISCOS ! q = mch_munge_fname(p); ! #else ! q = expand_env_save(p); ! #endif ! if (q == NULL) ! return FAIL; ! #ifdef RISCOS ! p = mch_munge_fname(q); ! #else ! p = expand_env_save(q); ! #endif ! vim_free(q); ! if (p == NULL) ! return FAIL; ! bp->dbg_name = fix_fname(p); ! vim_free(p); ! #ifdef MACOS_CLASSIC ! if (bp->dbg_name != NULL) ! slash_n_colon_adjust(bp->dbg_name); ! #endif ! } ! ! if (bp->dbg_name == NULL) return FAIL; return OK; } *** ../vim61.366/src/version.c Sat Mar 8 20:33:33 2003 --- src/version.c Sat Mar 8 20:54:16 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 367, /**/ -- Imagine a world without hypothetical situations. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///