<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/break.sh</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,7 @@ pkgdata_DATA =       \
 	run.sh       \
 	set.sh       \
 	show.sh      \
+	source.sh    \
 	stepping.sh  \
 	tracefn.sh   \
 	where.sh</diff>
      <filename>command/Makefile.am</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 ;;; kshdb.el --- ksh Debugger mode via GUD and kshdb
 ;;; $Id: kshdb.el,v 1.43 2007/11/30 01:58:43 rockyb Exp $
 
-;; Copyright (C) 2002, 2006, 2007 Rocky Bernstein (rocky@gnu.org) 
+;; Copyright (C) 2002, 2006, 2007, 2008 Rocky Bernstein (rocky@gnu.org) 
 ;;                    and Masatake YAMATO (jet@gyve.org)
 
 ;; This program is free software; you can redistribute it and/or modify</diff>
      <filename>emacs/kshdb.el</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 pkgdatadir        = ${datadir}/@PACKAGE@/lib
 pkgdata_DATA =      	\
 	alias.sh        \
+	break.sh        \
 	columnize.sh    \
 	dbg-call.sh  	\
 	file.sh         \</diff>
      <filename>lib/Makefile.am</filename>
    </modified>
    <modified>
      <diff>@@ -71,6 +71,28 @@ function _Dbg_hook {
     
     # Determine if we stop or not. 
 
+    # Check breakpoints.
+    if ((_Dbg_brkpt_count &gt; 0)) ; then 
+	typeset -i _Dbg_brkpt_num
+	if _Dbg_hook_breakpoint_hit ; then 
+	    if ((_Dbg_step_force)) ; then
+		typeset _Dbg_frame_previous_file=&quot;$_Dbg_frame_last_filename&quot;
+		typeset -i _Dbg_frame_previous_lineno=&quot;$_Dbg_frame_last_lineno&quot;
+	    fi
+	    _Dbg_frame_save_frames 1
+	    ((_Dbg_brkpt_counts[_Dbg_brkpt_num]++))
+	    _Dbg_msg &quot;Breakpoint $_Dbg_brkpt_num hit.&quot;
+	    if (( ${_Dbg_brkpt[_Dbg_brkpt_num].onetime} == 1 )) ; then
+		_Dbg_stop_reason='at a breakpoint that has since been deleted'
+		_Dbg_delete_brkpt_entry $_Dbg_brkpt_num
+	    else
+		_Dbg_stop_reason='breakpoint reached'
+	    fi
+	    _Dbg_hook_enter_debugger $_Dbg_stop_reason
+	    return $?
+	fi
+    fi
+
     # Check if step mode and number of steps to ignore.
     if ((_Dbg_step_ignore == 0 &amp;&amp; ! _Dbg_skipping_fn )); then
 
@@ -103,6 +125,38 @@ function _Dbg_hook {
     return 0
 }
 
+# Return 0 if we are at a breakpoint position or 1 if not.
+# Sets _Dbg_brkpt_num to the breakpoint number found.
+_Dbg_hook_breakpoint_hit() {
+    typeset full_filenaname
+    typeset file_line
+#     file_line=${funcfiletrace[1]}
+#     typeset -a split_result; _Dbg_split &quot;$file_line&quot; ':'
+#     full_filename=${split_result[0]}
+#     lineno=${split_result[1]}
+#     full_filename=$(_Dbg_is_file $full_filename)
+#     if [[ -r $full_filename ]] ; then 
+# 	_Dbg_file2canonic[$filename]=&quot;$fullname&quot;
+#     fi
+#     typeset -a linenos
+#     linenos=${_Dbg_brkpt_file2linenos[$full_filename]}
+#     typeset -i try_lineno
+#     typeset -i i=-1
+#     # Check breakpoints within full_filename
+#     for try_lineno in $linenos ; do 
+# 	((i++))
+# 	if (( try_lineno == lineno )) ; then
+# 	    # Got a match, but is the breakpoint enabled? 
+# 	    typeset -a brkpt_nos; brkpt_nos=(${_Dbg_brkpt_file2brkpt[$full_filename]})
+# 	    (( _Dbg_brkpt_num = brkpt_nos[i] ))
+# 	    if ((_Dbg_brkpt_enable[_Dbg_brkpt_num] )) ; then
+# 		return 0
+# 	    fi
+# 	fi
+#     done
+    return 1
+}
+
 # Go into the command loop
 _Dbg_hook_enter_debugger() {
     _Dbg_stop_reason=&quot;$1&quot;</diff>
      <filename>lib/hook.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b12fb8594783a56182d46d5951e16802c1824ebc</id>
    </parent>
  </parents>
  <author>
    <name>R. Bernstein</name>
    <email>rocky@gnu.org</email>
  </author>
  <url>http://github.com/rocky/kshdb/commit/1a63b3f9406000d442bd326dbe65b302a9f5708e</url>
  <id>1a63b3f9406000d442bd326dbe65b302a9f5708e</id>
  <committed-date>2008-11-02T07:21:10-08:00</committed-date>
  <authored-date>2008-11-02T07:21:10-08:00</authored-date>
  <message>Get closer (I hope) to getting breakpoints working.
At present though, there is no visible progress.</message>
  <tree>db5e3b50959bdb7761058769d484315439eefc58</tree>
  <committer>
    <name>R. Bernstein</name>
    <email>rocky@gnu.org</email>
  </committer>
</commit>
