# HG changeset patch # User John W. Eaton # Date 1364442141 14400 # Node ID 3cacd597464dc8279b729442bcf3a7bc006da5c1 # Parent 389b09a914e264bbac1d4dacc9c9536265eee079 improve naming of debug pointer update callbacks and signals * file-editor-interface.h (file_editor_interface::handle_update_debug_pointer_request): Rename from file_editor_interface::handle_dbstop_request. Change all uses. * file-editor.h, file-editor.cc (file_editor::handle_update_debug_pointer_request): Rename from file_editor::handle_dbstop_request. Change all uses. * main-window.h, main-window.cc (main_window::handle_update_debug_pointer_request): Rename from main_window::handle_dbstop_request. Change all uses. * octave-event-listener.h (event_listener::update_debug_pointer): Rename from event_listener::dbstop. Change all uses. * octave-link.h, octave-link.cc (octave_link::do_update_debug_pointer): Rename from octave_link::do_dbstop. Change all uses. (octave_link::do_debug_input_event_hook_fcn): Rename from octave_link::do_dbstop_event_hook_fcn. Change all uses. * octave-main-thread.cc (debug_input_event_hook_fcn): Rename from dbstop_event_hook_fcn. * octave-qt-event-listener.h, octave-qt-event-listener.cc (octave_qt_event_listener::update_debug_pointer): Rename from octave_qt_event_listener::dbstop. Change all uses. (octave_qt_event_listener::update_debug_pointer_signal): Rename from octave_qt_event_listener::dbstop_signal. * input.cc (debug_input_event_hook_functions): Rename from dbstop_event_hook_functions. Change all uses. (Fadd_debug_input_event_hook): Rename from Fadd_dbstop_event_hook. Change all uses. (Fremove_debug_input_event_hook): Rename from remove_dbstop_event_hook. Change all uses. diff -r 389b09a914e2 -r 3cacd597464d libgui/src/m-editor/file-editor-interface.h --- a/libgui/src/m-editor/file-editor-interface.h Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/m-editor/file-editor-interface.h Wed Mar 27 23:42:21 2013 -0400 @@ -46,7 +46,7 @@ virtual void handle_entered_debug_mode () = 0; virtual void handle_quit_debug_mode () = 0; - virtual void handle_dbstop_request (const QString& file, int line) = 0; + virtual void handle_update_debug_pointer_request (const QString& file, int line) = 0; virtual void set_focus () = 0; public slots: diff -r 389b09a914e2 -r 3cacd597464d libgui/src/m-editor/file-editor.cc --- a/libgui/src/m-editor/file-editor.cc Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/m-editor/file-editor.cc Wed Mar 27 23:42:21 2013 -0400 @@ -292,7 +292,7 @@ } void -file_editor::handle_dbstop_request (const QString& file, int line) +file_editor::handle_update_debug_pointer_request (const QString& file, int line) { request_open_file (file, line, true); } diff -r 389b09a914e2 -r 3cacd597464d libgui/src/m-editor/file-editor.h --- a/libgui/src/m-editor/file-editor.h Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/m-editor/file-editor.h Wed Mar 27 23:42:21 2013 -0400 @@ -129,7 +129,7 @@ void handle_mru_add_file (const QString& file_name); void check_conflict_save (const QString& fileName, bool remove_on_success); - void handle_dbstop_request (const QString& file, int line); + void handle_update_debug_pointer_request (const QString& file, int line); /** Tells the editor to react on changed settings. */ void notice_settings (); diff -r 389b09a914e2 -r 3cacd597464d libgui/src/main-window.cc --- a/libgui/src/main-window.cc Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/main-window.cc Wed Mar 27 23:42:21 2013 -0400 @@ -510,10 +510,10 @@ } void -main_window::handle_dbstop_request (const QString& file, int line) +main_window::handle_update_debug_pointer_request (const QString& file, int line) { #ifdef HAVE_QSCINTILLA - _file_editor->handle_dbstop_request (file, line); + _file_editor->handle_update_debug_pointer_request (file, line); #endif } @@ -1174,8 +1174,8 @@ SLOT (handle_quit_debug_mode ())); connect (_octave_qt_event_listener, - SIGNAL (dbstop_signal (const QString&, int)), this, - SLOT (handle_dbstop_request (const QString&, int))); + SIGNAL (update_debug_pointer_signal (const QString&, int)), this, + SLOT (handle_update_debug_pointer_request (const QString&, int))); } void diff -r 389b09a914e2 -r 3cacd597464d libgui/src/main-window.h --- a/libgui/src/main-window.h Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/main-window.h Wed Mar 27 23:42:21 2013 -0400 @@ -118,7 +118,7 @@ void handle_entered_debug_mode (); void handle_quit_debug_mode (); - void handle_dbstop_request (const QString& file, int line); + void handle_update_debug_pointer_request (const QString& file, int line); void debug_continue (); void debug_step_into (); void debug_step_over (); diff -r 389b09a914e2 -r 3cacd597464d libgui/src/octave-adapter/octave-event-listener.h --- a/libgui/src/octave-adapter/octave-event-listener.h Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/octave-adapter/octave-event-listener.h Wed Mar 27 23:42:21 2013 -0400 @@ -40,7 +40,7 @@ virtual void update_history (void) = 0; - virtual void dbstop (const std::string& file, int line) = 0; + virtual void update_debug_pointer (const std::string& file, int line) = 0; virtual void about_to_exit () = 0; diff -r 389b09a914e2 -r 3cacd597464d libgui/src/octave-adapter/octave-link.cc --- a/libgui/src/octave-adapter/octave-link.cc Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/octave-adapter/octave-link.cc Wed Mar 27 23:42:21 2013 -0400 @@ -157,7 +157,7 @@ } void -octave_link::do_dbstop (const octave_value_list& args) +octave_link::do_update_debug_pointer (const octave_value_list& args) { if (event_listener) { @@ -175,7 +175,7 @@ if (! error_state) { - event_listener->dbstop (file, line); + event_listener->update_debug_pointer (file, line); do_process_events (); } @@ -203,9 +203,9 @@ } void -octave_link::do_dbstop_event_hook_fcn (const octave_value_list& args) +octave_link::do_debug_input_event_hook_fcn (const octave_value_list& args) { - do_dbstop (args); + do_update_debug_pointer (args); } bool diff -r 389b09a914e2 -r 3cacd597464d libgui/src/octave-adapter/octave-link.h --- a/libgui/src/octave-adapter/octave-link.h Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/octave-adapter/octave-link.h Wed Mar 27 23:42:21 2013 -0400 @@ -134,12 +134,6 @@ instance->do_update_history (); } - static void dbstop (const octave_value_list& args) - { - if (instance_ok ()) - instance->do_dbstop (args); - } - static void pre_input_event_hook_fcn (void) { if (instance_ok ()) @@ -152,10 +146,10 @@ instance->do_post_input_event_hook_fcn (); } - static void dbstop_event_hook_fcn (const octave_value_list& args) + static void debug_input_event_hook_fcn (const octave_value_list& args) { if (instance_ok ()) - instance->do_dbstop_event_hook_fcn (args); + instance->do_debug_input_event_hook_fcn (args); } private: @@ -220,11 +214,11 @@ std::string do_last_working_directory (void); void do_update_workspace (void); void do_update_history (void); - void do_dbstop (const octave_value_list& args); + void do_update_debug_pointer (const octave_value_list& args); void do_pre_input_event_hook_fcn (void); void do_post_input_event_hook_fcn (void); - void do_dbstop_event_hook_fcn (const octave_value_list& args); + void do_debug_input_event_hook_fcn (const octave_value_list& args); }; #endif // OCTAVELINK_H diff -r 389b09a914e2 -r 3cacd597464d libgui/src/octave-adapter/octave-main-thread.cc --- a/libgui/src/octave-adapter/octave-main-thread.cc Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/octave-adapter/octave-main-thread.cc Wed Mar 27 23:42:21 2013 -0400 @@ -56,11 +56,11 @@ } static octave_value_list -dbstop_event_hook_fcn (const octave_value_list& args, int) +debug_input_event_hook_fcn (const octave_value_list& args, int) { octave_value_list retval; - octave_link::dbstop_event_hook_fcn (args); + octave_link::debug_input_event_hook_fcn (args); return retval; } @@ -88,9 +88,9 @@ octave_value post_fcn_handle (new octave_fcn_handle (post_fcn)); Fadd_post_input_event_hook (post_fcn_handle); - octave_value dbstop_fcn (new octave_builtin (dbstop_event_hook_fcn)); - octave_value dbstop_fcn_handle (new octave_fcn_handle (dbstop_fcn)); - Fadd_dbstop_event_hook (dbstop_fcn_handle); + octave_value debug_fcn (new octave_builtin (debug_input_event_hook_fcn)); + octave_value debug_fcn_handle (new octave_fcn_handle (debug_fcn)); + Fadd_debug_input_event_hook (debug_fcn_handle); // Prime the history list. octave_link::update_history (); diff -r 389b09a914e2 -r 3cacd597464d libgui/src/octave-qt-event-listener.cc --- a/libgui/src/octave-qt-event-listener.cc Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/octave-qt-event-listener.cc Wed Mar 27 23:42:21 2013 -0400 @@ -54,9 +54,10 @@ } void -octave_qt_event_listener::dbstop (const std::string& file, int line) +octave_qt_event_listener::update_debug_pointer (const std::string& file, + int line) { - emit dbstop_signal (QString::fromStdString (file), line); + emit update_debug_pointer_signal (QString::fromStdString (file), line); } void diff -r 389b09a914e2 -r 3cacd597464d libgui/src/octave-qt-event-listener.h --- a/libgui/src/octave-qt-event-listener.h Wed Mar 27 20:29:06 2013 -0400 +++ b/libgui/src/octave-qt-event-listener.h Wed Mar 27 23:42:21 2013 -0400 @@ -37,7 +37,7 @@ void current_directory_has_changed (const std::string& directory); void update_workspace (void); void update_history (void); - void dbstop (const std::string& file, int line); + void update_debug_pointer (const std::string& file, int line); void about_to_exit (); void entered_debug_mode (); @@ -47,7 +47,7 @@ void current_directory_has_changed_signal (const QString& directory); void update_workspace_signal (void); void update_history_signal (void); - void dbstop_signal (const QString& file, int line); + void update_debug_pointer_signal (const QString& file, int line); void entered_debug_mode_signal (); void quit_debug_mode_signal (); }; diff -r 389b09a914e2 -r 3cacd597464d libinterp/interpfcn/input.cc --- a/libinterp/interpfcn/input.cc Wed Mar 27 20:29:06 2013 -0400 +++ b/libinterp/interpfcn/input.cc Wed Mar 27 23:42:21 2013 -0400 @@ -125,7 +125,7 @@ static hook_function_list pre_input_event_hook_functions; static hook_function_list input_event_hook_functions; static hook_function_list post_input_event_hook_functions; -static hook_function_list dbstop_event_hook_functions; +static hook_function_list debug_input_event_hook_functions; // For octave_quit. void @@ -508,7 +508,7 @@ octave_value location_info (location_info_map); - dbstop_event_hook_functions.run (location_info); + debug_input_event_hook_functions.run (location_info); std::string line_buf = get_file_line (nm, curr_debug_line); @@ -1368,10 +1368,10 @@ return retval; } -DEFUN (add_dbstop_event_hook, args, , +DEFUN (add_debug_input_event_hook, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {@var{id} =} add_dbstop_event_hook (@var{fcn})\n\ -@deftypefnx {Built-in Function} {@var{id} =} add_dbstop_event_hook (@var{fcn}, @var{data})\n\ +@deftypefn {Built-in Function} {@var{id} =} add_debug_input_event_hook (@var{fcn})\n\ +@deftypefnx {Built-in Function} {@var{id} =} add_debug_input_event_hook (@var{fcn}, @var{data})\n\ Add the named function or function handle @var{fcn} to the list of\n\ functions to call when a debugger breakpoint is reached. The function\n\ should have the form\n\ @@ -1394,7 +1394,7 @@ \n\ The returned identifier may be used to remove the function handle from\n\ the list of input hook functions.\n\ -@seealso{remove_dbstop_event_hook}\n\ +@seealso{remove_debug_input_event_hook}\n\ @end deftypefn") { octave_value retval; @@ -1412,12 +1412,12 @@ if (! error_state) { - dbstop_event_hook_functions.insert (hook_fcn.id (), hook_fcn); + debug_input_event_hook_functions.insert (hook_fcn.id (), hook_fcn); retval = hook_fcn.id (); } else - error ("add_dbstop_event_hook: expecting string as first arg"); + error ("add_debug_input_event_hook: expecting string as first arg"); } else print_usage (); @@ -1425,14 +1425,14 @@ return retval; } -DEFUN (remove_dbstop_event_hook, args, , +DEFUN (remove_debug_input_event_hook, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} remove_dbstop_event_hook (@var{name})\n\ -@deftypefnx {Built-in Function} {} remove_dbstop_event_hook (@var{fcn_id})\n\ +@deftypefn {Built-in Function} {} remove_debug_input_event_hook (@var{name})\n\ +@deftypefnx {Built-in Function} {} remove_debug_input_event_hook (@var{fcn_id})\n\ Remove the named function or function handle with the given identifier\n\ from the list of functions to call immediately after accepting\n\ interactive user input.\n\ -@seealso{add_dbstop_event_hook}\n\ +@seealso{add_debug_input_event_hook}\n\ @end deftypefn") { octave_value_list retval; @@ -1448,16 +1448,16 @@ if (! error_state) { hook_function_list::iterator p - = dbstop_event_hook_functions.find (hook_fcn_id); + = debug_input_event_hook_functions.find (hook_fcn_id); - if (p != dbstop_event_hook_functions.end ()) - dbstop_event_hook_functions.erase (p); + if (p != debug_input_event_hook_functions.end ()) + debug_input_event_hook_functions.erase (p); else if (warn) - warning ("remove_dbstop_event_hook: %s not found in list", + warning ("remove_debug_input_event_hook: %s not found in list", hook_fcn_id.c_str ()); } else - error ("remove_dbstop_event_hook: argument not valid as a hook function name or id"); + error ("remove_debug_input_event_hook: argument not valid as a hook function name or id"); } else print_usage ();