octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Breakpoints not working in hg.


From: John W. Eaton
Subject: Breakpoints not working in hg.
Date: Tue, 01 Apr 2008 13:51:55 -0400

On  1-Apr-2008, Ryan Rusaw wrote:

| Breakpoints don't seem to be working correctly in mercurial. With this
| simple function:
| 
| function test_func()
|        disp("Hello")
| endfunction
| 
| octave:1> dbstop("test_func","2")
| ans =  2
| octave:2> dbstatus
| Breakpoint in test_func at line(s) 2.
| octave:3> test_func
| Hello
| octave:4>
| 
| No breakpoint is encountered.
| 
| Note: version 3.0.0 hits the breakpoint correctly, and brings up the
| debug console prompt.
| 
| octave:1> dbstop("test_func","2")
| ans =  2
| octave:2> dbstatus
| Breakpoint in test_func at line(s) 2.
| octave:3> test_func
| test_func: line 2, column 2
| disp
| keyboard: stopped in
| /media/KINGSTON/runtime-net.sf.octclipse.rcp.product/octave_test/test_func.m
| at line 2
| debug>

Please try the following patch.

jwe

# HG changeset patch
# User John W. Eaton <address@hidden>
# Date 1207072227 14400
# Node ID db02cc0ba8f283599173c5e3575fdfa3ffb81763
# Parent  6c0f7bcf5b557042f3c12750e36da120f0424135
handle breakpoints in tree_identifier::do_lookup

diff --git a/src/ChangeLog b/src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@ 2008-03-28  Jaroslav Hajek  <address@hidden
+2008-04-01  John W. Eaton  <address@hidden>
+
+       * pt-id.h (do_lookup (bool&, bool)): Delete.
+       (do_lookup (tree_argument_list *, const string_vector&,
+       octave_value_list&, bool&)): Call MAYBE_DO_BREAKPOINT here.
+
 2008-03-28  Jaroslav Hajek  <address@hidden>
 
        * DLD-FUNCTIONS/lookup.cc: New file.
diff --git a/src/pt-id.h b/src/pt-id.h
--- a/src/pt-id.h
+++ b/src/pt-id.h
@@ -33,6 +33,7 @@ class octave_function;
 
 class tree_walker;
 
+#include "pt-bp.h"
 #include "pt-exp.h"
 #include "symtab.h"
 
@@ -79,18 +80,11 @@ public:
   //     then .mex files, then .m files.
 
   octave_value
-  do_lookup (bool& script_file_executed, bool exec_script = true)
-  {
-    // FIXME -- SYMTAB: what about executing script files?
-    octave_value_list evaluated_args;
-    bool args_evaluated;
-    return sym.find (0, string_vector (), evaluated_args, args_evaluated);
-  }
-
-  octave_value
   do_lookup (tree_argument_list *args, const string_vector& arg_names,
             octave_value_list& evaluated_args, bool& args_evaluated)
   {
+    MAYBE_DO_BREAKPOINT;
+
     return sym.find (args, arg_names, evaluated_args, args_evaluated);
   }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]