Branch: refs/heads/master Author: Dimitar Zhekov dimitar.zhekov@gmail.com Committer: Dimitar Zhekov dimitar.zhekov@gmail.com Date: Tue, 27 Aug 2013 18:35:22 UTC Commit: c2bf3e7617ab0b86bb075ff6cbf8854dd373e574 https://github.com/geany/geany-plugins/commit/c2bf3e7617ab0b86bb075ff6cbf885...
Log Message: ----------- scope - fixed inspect update/refresh and win32 waf build paths
Modified Paths: -------------- scope/ChangeLog scope/NOTES scope/docs/codes.html scope/docs/scope.html scope/src/inspect.c scope/src/prefs.c scope/src/prefs.h scope/src/register.c scope/src/scope.c scope/src/views.c scope/wscript_build
Modified: scope/ChangeLog 35 files changed, 26 insertions(+), 9 deletions(-) =================================================================== @@ -1,18 +1,35 @@ +2013-08-25 Dimitar Zhekov dimitar.zhekov@gmail.com + + * docs/codes.html, docs/scope.html, src/inspect.c, + src/prefs.c, src/prefs.h, src/views.c: + Fixed Inspect Refresh. + Added an option to disable Inspect Refresh/update in Hang mode + (causes internal gdb error). + * wscript_build: + Fixed the path handling when building with Waf under win32: Geany + does not change to it's own directory any more. + * src/register.c, src/scope.c: + Fixed unused variable warnings. + * docs/scope.html, src/scope.c: + Increased version to 0.91.3. + + 2013-07-30 Dimitar Zhekov dimitar.zhekov@gmail.com
* src/views.c: - Use map signal to pre-change contents when editing tree - cells, since map-event is not received under Windows. + Use map signal to pre-change contents when editing tree cells, + since map-event is not received under Windows. * Windows panel defaults to THREADS view, not PROGRAM.
+ 2013-07-25 Dimitar Zhekov dimitar.zhekov@gmail.com
* src/break.c, src/conterm.c, src/debug.c, src/inspect.c, src/memory.c, src/menu.c, src/parse.c, src/program.c, src/register.c, src/scope.c, src/stack.c, src/thread.c, src/tooltip.c, src/tooltip.h, src/views.c: - Explicitly initialize all sensitive global and static - variables, since reloading the plugin will not do that. + Explicitly initialize all sensitive global and static variables, + since reloading the plugin will not do that. * src/store/scptreestore.c: Fixed indentation. * docs/scope.html, src/scope.c: @@ -22,8 +39,8 @@ 2013-07-11 Dimitar Zhekov dimitar.zhekov@gmail.com
* src/scope.c: - Update toolbar state when saving a document or switching to - another document, and properly cache the last state. + Update toolbar state when saving a document or switching to another + document, and properly cache the last state. * src/utils.c: Recognize F77 as gdb-supported file type (was only Fortran). * docs/scope.html, src/scope.c: @@ -58,8 +75,8 @@ 2013-07-02 Dimitar Zhekov dimitar.zhekov@gmail.com
* src/views.c: - Fixed shutdown sequence error when destroying Inspect or - Registers switches to the other page and causes refresh. + Fixed shutdown sequence error when destroying Inspect or Registers + switches to the other page and causes refresh. Fixed the page number to refresh when switching to Inspect or Registers.
@@ -183,7 +200,7 @@
2013-03-07 Enrico Tröger enrico.troeger@uvena.de
- * wscript_build + * wscript_build: Fixed the path handling when building with Waf.
Modified: scope/NOTES 3 files changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,6 @@ +-var-evaluate-expression reports the value from the last -var-update or +-var-assign execution, not the current value + reloading a resident geany plugin module does not reinitialize any global and static variables, so the sensitive ones must be initialized explicitly
Modified: scope/docs/codes.html 8 files changed, 6 insertions(+), 2 deletions(-) =================================================================== @@ -109,7 +109,7 @@
<tr><td class="nowrap">02<scid>-var-evaluate-expression</td> <td class="tab"><em>Refresh</em> inspects</td> - <td class="tab">update register value</td></tr> + <td class="tab">update inspect value</td></tr>
<tr><td class="nowrap"> </td><td class="tab"> </td><td class="tab"> </td></tr>
@@ -135,10 +135,14 @@ <td class="tab">views idle update</td> <td class="tab">(print instruction in debug console)</td></tr>
-<tr><td class="nowrap">04-var-update</td> +<tr><td class="nowrap">040-var-update</td> <td class="tab">views idle update</td> <td class="tab">(partial) inspects update</td></tr>
+<tr><td class="nowrap">041-var-update</td> + <td class="tab"><em>Refresh</em> inspects</td> + <td class="tab">(prepare gdb for -var-evaluate-expression)</td></tr> + <tr><td class="nowrap">04<tid>-stack-list-frames</td> <td class="tab">views idle update</td> <td class="tab">same as 02</td></tr>
Modified: scope/docs/scope.html 18 files changed, 14 insertions(+), 4 deletions(-) =================================================================== @@ -459,8 +459,9 @@
<p><b><a name="inspect">Inspect</a></b></p>
-<p>All -var-* commands except -var-update will be ignored when entered from the command line, -because their output does not provide enough information to identify the variable object.</p> +<p>-var-* commands entered from the command line will not update the <em>Inspect</em> view, +because their output does not provide enough information to identify the variable object, +and/or their PRINT-VALUES argument is unknown.</p>
<p><em>Jump To</em> lists the top-level variables, which is useful if you have a lot of children displayed. It's disabled while gdb is inactive, because all variables are collapsed @@ -508,7 +509,13 @@ larger, for example Scope may be activated only 10 times per second if Geany is idle.</p>
<p><em>async_break_bugs</em> (win~1 only) - whether gdb escapes slashes twice in the -asynchronous break messages. If true, only <tt>=breakpoint-deleted</tt> will be handled.</p> +asynchronous break messages. if true (the default), only <tt>=breakpoint-deleted</tt> will be +handled.</p> + +<p><em>var_update_bug</em> - whether -var-update causes internal gdb error if the program is +loaded but not running. If true (the default), the update of inspect expressions (including +<em>Refresh</em>) will be disabled in <em>Hand</em> state. AFAIK, they will always have the +globally initialized values (if any) in that state anyway.</p>
<p><em>auto_view_source</em> - seek in source on single click in threads, breakpoints and stack.</p> @@ -591,6 +598,9 @@ <p>A disabled check button or check menu item means that the respective functionality is unavailable; it doesn't matter if the interface element is checked or not.</p>
+<p>Frame-dependent commands entered from the command line will not update the respective view, +because their output does not contain thread and frame information.</p> + <p><b><a name="editing_values">Editing values</a></b></p>
<div>GDB often displays values in format unsuitable for assigning. So when editing a value, @@ -738,7 +748,7 @@
<b><a name="copyright">Copyright</a></b>
-<p>Scope 0.91.2, Copyright (C) 2013 Dimitar Toshkov Zhekov</p> +<p>Scope 0.91.3, Copyright (C) 2013 Dimitar Toshkov Zhekov</p>
<p>The menu and toolbar icons are from <a href="http://netbeans.org">Netbeans</a>, except for BreakPoint.</p>
Modified: scope/src/inspect.c 19 files changed, 14 insertions(+), 5 deletions(-) =================================================================== @@ -485,9 +485,14 @@ static void inspect_node_change(const ParseNode *node, G_GNUC_UNUSED gpointer gd void on_inspect_changelist(GArray *nodes) { GArray *changelist = parse_lead_array(nodes); + const char *token = parse_grab_token(nodes);
- if (parse_grab_token(nodes)) - parse_foreach(changelist, (GFunc) inspect_node_change, NULL); + if (token) + { + iff (*token <= '1', "%s: invalid i_oper", token) + if (*token == '0') + parse_foreach(changelist, (GFunc) inspect_node_change, NULL); + } else if (changelist->len) query_all_inspects = TRUE; } @@ -547,7 +552,8 @@ static gint inspect_iter_refresh(ScpTreeStore *store, GtkTreeIter *iter, gpointe
static void inspects_send_refresh(char token) { - scp_tree_store_traverse(store, TRUE, NULL, NULL, inspect_iter_refresh, NULL); + scp_tree_store_traverse(store, TRUE, NULL, NULL, inspect_iter_refresh, + GINT_TO_POINTER(token)); query_all_inspects = FALSE; }
@@ -556,7 +562,7 @@ gboolean inspects_update(void) if (query_all_inspects) inspects_send_refresh('4'); else - debug_send_command(F, "04-var-update 1 *"); + debug_send_command(F, "040-var-update 1 *");
return TRUE; } @@ -783,6 +789,7 @@ void inspects_save(GKeyFile *config)
static void on_inspect_refresh(G_GNUC_UNUSED const MenuItem *menu_item) { + debug_send_command(F, "041-var-update 1 *"); inspects_send_refresh('2'); }
@@ -971,7 +978,7 @@ static void on_inspect_delete(G_GNUC_UNUSED const MenuItem *menu_item)
static MenuItem inspect_menu_items[] = { - { "inspect_refresh", on_inspect_refresh, DS_VARIABLE, NULL, NULL }, + { "inspect_refresh", on_inspect_refresh, DS_DEBUG, NULL, NULL }, { "inspect_add", on_inspect_add, DS_NOT_BUSY, NULL, NULL }, { "inspect_edit", on_inspect_edit, DS_EDITABLE, NULL, NULL }, { "inspect_apply", on_inspect_apply, DS_APPLIABLE, NULL, NULL }, @@ -1148,6 +1155,8 @@ void inspect_init(void) g_signal_connect(selection, "changed", G_CALLBACK(on_inspect_selection_changed), NULL); menu = menu_select("inspect_menu", &inspect_menu_info, selection); g_signal_connect(menu, "show", G_CALLBACK(on_inspect_menu_show), NULL); + if (!pref_var_update_bug) + inspect_menu_items->state = DS_VARIABLE;
inspect_dialog = dialog_connect("inspect_dialog"); inspect_name = GTK_ENTRY(get_widget("inspect_name_entry"));
Modified: scope/src/prefs.c 2 files changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -34,6 +34,7 @@ gint pref_gdb_send_interval; gboolean pref_async_break_bugs; #endif +gboolean pref_var_update_bug;
gboolean pref_auto_view_source; gboolean pref_keep_exec_point; @@ -237,6 +238,7 @@ void prefs_init(void) stash_group_add_integer(group, &pref_gdb_send_interval, "gdb_send_interval", 5); stash_group_add_boolean(group, &pref_async_break_bugs, "async_break_bugs", TRUE); #endif + stash_group_add_boolean(group, &pref_var_update_bug, "var_update_bug", TRUE); stash_group_add_boolean(group, &pref_auto_view_source, "auto_view_source", FALSE); stash_group_add_boolean(group, &pref_keep_exec_point, "keep_exec_point", FALSE); stash_group_add_integer(group, &pref_visual_beep_length, "visual_beep_length", 25);
Modified: scope/src/prefs.h 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -27,6 +27,7 @@ extern gint pref_gdb_send_interval; extern gboolean pref_async_break_bugs; #endif +extern gboolean pref_var_update_bug;
extern gboolean pref_auto_view_source; extern gboolean pref_keep_exec_point;
Modified: scope/src/register.c 1 files changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -375,7 +375,6 @@ static gboolean register_load(GKeyFile *config, const char *section) char *name = utils_key_file_get_string(config, section, "name"); gint format = utils_get_setting_integer(config, section, "format", FORMAT_NATURAL); gboolean valid = FALSE; - GtkTreeIter iter;
if (name && (unsigned) format < FORMAT_COUNT) {
Modified: scope/src/scope.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -32,7 +32,7 @@ PLUGIN_VERSION_CHECK(215)
PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, _("Scope Debugger"), - _("Relatively simple GDB front-end."), "0.91.2" , + _("Relatively simple GDB front-end."), "0.91.3" , "Dimitar Toshkov Zhekov dimitar.zhekov@gmail.com")
/* Keybinding(s) */ @@ -379,7 +379,7 @@ static void on_document_filetype_set(G_GNUC_UNUSED GObject *obj, GeanyDocument * toolbar_update_state(state); }
-static void on_document_activate(G_GNUC_UNUSED GObject *obj, GeanyDocument *doc, +static void on_document_activate(G_GNUC_UNUSED GObject *obj, G_GNUC_UNUSED GeanyDocument *doc, G_GNUC_UNUSED gpointer user_data) { toolbar_update_state(debug_state());
Modified: scope/src/views.c 5 files changed, 4 insertions(+), 1 deletions(-) =================================================================== @@ -50,7 +50,7 @@ { FALSE, VC_FRAME, watches_clear, watches_update, FALSE, DS_VARIABLE }, { FALSE, VC_DATA, memory_clear, memory_update, FALSE, DS_VARIABLE }, { FALSE, VC_NONE, NULL, dc_update, FALSE, DS_DEBUG }, - { FALSE, VC_FRAME, inspects_clear, inspects_update, FALSE, DS_VARIABLE }, + { FALSE, VC_FRAME, inspects_clear, inspects_update, FALSE, DS_DEBUG }, { FALSE, VC_FRAME, registers_clear, registers_update, TRUE, DS_DEBUG }, { FALSE, VC_DATA, tooltip_clear, tooltip_update, FALSE, DS_SENDABLE }, { FALSE, VC_NONE, menu_clear, NULL, FALSE, 0 } @@ -611,6 +611,9 @@ void views_init(void) #endif last_views_state = 0;
+ if (!pref_var_update_bug) + views[VIEW_INSPECT].state = DS_VARIABLE; + command_dialog = dialog_connect("command_dialog"); command_view = get_widget("command_view"); command_text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(command_view));
Modified: scope/wscript_build 19 files changed, 9 insertions(+), 10 deletions(-) =================================================================== @@ -28,25 +28,24 @@ name = 'Scope' includes = ['scope/src', 'scope/src/store']
if target_is_win32(bld): - datadir = '${GEANYPLUGINS_DATADIR}/geany-plugins/scope' + datadir = '${G_PREFIX}/${GEANYPLUGINS_DATADIR}/geany-plugins/scope' docdir = 'doc/plugins/scope' - prefix = '${G_PREFIX}/' + htmldocdir = '${G_PREFIX}/%s/html' % docdir libraries = [] else: datadir = '${GEANYPLUGINS_DATADIR}/geany-plugins/scope' docdir = '${DOCDIR}/scope' - prefix = '' + htmldocdir = '%s/html' % docdir libraries = ['VTE', 'UTIL']
-htmldocdir = '%s/html' % docdir -defines = [ subst_vars('PLUGINDATADIR="' + datadir + '"', bld.env), - subst_vars('PLUGINHTMLDOCDIR="' + htmldocdir + '"', bld.env)] +defines = [ subst_vars('PLUGINDATADIR="' + datadir + '"', bld.env).replace("\", "/"), + subst_vars('PLUGINHTMLDOCDIR="' + htmldocdir + '"', bld.env).replace("\", "/")]
build_plugin(bld, name, includes=includes, libraries=libraries, defines=defines)
-bld.install_files('%s%s' % (prefix, htmldocdir), 'docs/codes.html') -bld.install_files('%s%s' % (prefix, htmldocdir), 'docs/scope.html') +bld.install_files(htmldocdir, 'docs/codes.html') +bld.install_files(htmldocdir, 'docs/scope.html')
start_dir = bld.path.find_dir('data') -bld.install_files('%s%s' % (prefix, datadir), start_dir.ant_glob('*.png'), cwd=start_dir) -bld.install_files('%s%s' % (prefix, datadir), 'data/scope.glade') +bld.install_files(datadir, start_dir.ant_glob('*.png'), cwd=start_dir) +bld.install_files(datadir, 'data/scope.glade')
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).