Branch: refs/heads/master Author: Dimitar Zhekov dimitar.zhekov@gmail.com Committer: Dimitar Zhekov dimitar.zhekov@gmail.com Date: Fri, 05 Jul 2013 16:06:18 UTC Commit: 91dad4fa2c5d8dc0bbda4e0dc284cf6896e9bccd https://github.com/geany/geany-plugins/commit/91dad4fa2c5d8dc0bbda4e0dc284cf...
Log Message: ----------- scope - various changes, v0.91
Modified Paths: -------------- scope/ChangeLog scope/NEWS scope/NOTES scope/TODO scope/docs/codes.html scope/docs/scope.html scope/src/debug.c scope/src/debug.h scope/src/inspect.c scope/src/inspect.h scope/src/memory.c scope/src/parse.c scope/src/register.c scope/src/scope.c scope/src/tooltip.c scope/src/views.c scope/src/views.h scope/src/watch.c
Modified: scope/ChangeLog 34 files changed, 34 insertions(+), 0 deletions(-) =================================================================== @@ -1,3 +1,37 @@ +2013-07-05 Dimitar Zhekov dimitar.zhekov@gmail.com + + * src/codes.html: + Documented the new Inspect commands. + * src/scope.html: + Explained the unified Watches/Memory/Inspect update policy. + * src/debug.c, src/debug.h, src/inspect.c, src/memory.c, + src/views.c, src/watch.c: + Unified the Watches/Memory/Inspect update policy. + * src/inspect.c, src/parse.c: + Added full Refresh instead of -var-update. + Fixed "new_numchild" -> "new_num_children". + Full update on an external changelist with >=1 elements. + Better support for float frame Inspect variables. + Support for out-of-scope assignments ignored by changelist. + * src/register.c: + Full update only if an external changed-registers contains at + least one element. + Disallow Format if no threads. + * docs/scope.html, src/scope.c: + Increased version to 0.91. + * TODO: + Inlined into scope.html. + + +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 the page number to refresh when switching to Inspect or + Registers. + + 2013-06-24 Dimitar Zhekov dimitar.zhekov@gmail.com
* data/scope.glade, docs/codes.html, docs/scope.html,
Modified: scope/NEWS 9 files changed, 8 insertions(+), 1 deletions(-) =================================================================== @@ -1,4 +1,11 @@ -Scope 0.90 (2013-05-17) +Scope 0.91 (2013-07-05) + + * Better support for float frame Inspect variables. + + * Unified and documented the Watch/Memory/Inspect update policy. + + +Scope 0.90 (2013-06-24)
* Added Registers next to Inspect.
Modified: scope/NOTES 13 files changed, 5 insertions(+), 8 deletions(-) =================================================================== @@ -1,12 +1,9 @@ -register modified is 07 since we may have watches and inspects containing -registers, and changing a register ($dh, $mm1.uint64) may change another -($dx, $st1); even if local variables can't be changed, that's enough +register modified is 07 since changing a register ($dh, $mm1.uint64) may +change another ($dx, $st1), and there is some chance of watches/inspects +containing a register
-when switching to stack...memory and update is not possible, the subpage -contents will be kept if an update command for this page was sent on the -last thread stop/changed; otherwise it'll be cleared - -"^done,value="", '7' matches 07-var-assign, handled later as "^done", '7' +07<scid>-var-assign is required, because assigning to an out of scope +(sub)variable may succeed(?), but not be reflected on -var-update *
the only way to fix unnecessary inspect drop target expansion is to block INTO, so deriving GtkTreeStore and altering GtkTreeDragDest makes no sense
Modified: scope/TODO 14 files changed, 0 insertions(+), 14 deletions(-) =================================================================== @@ -1,14 +0,0 @@ -proper support for @ inspect frame - -various tests, source code checks etc. - -add clear icon to entries? not very useful - -test inspect new_numchild and in_scope changes - (but with C, these do not seem to change) - -don't remove [index] along with member names? - -Format (natural, decimal...) for Watches? - -libtool support / exec wrapper support
Modified: scope/docs/codes.html 12 files changed, 10 insertions(+), 2 deletions(-) =================================================================== @@ -105,7 +105,11 @@
<tr><td class="nowrap">02<f><fid>-data-list-register-values</td> <td class="tab">change register <em>Format</em></td> - <td class="tab">update register value and/or format</td> + <td class="tab">update register value and/or format</td></tr> + +<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>
<tr><td class="nowrap"> </td><td class="tab"> </td><td class="tab"> </td></tr>
@@ -163,6 +167,10 @@ <td class="tab">views idle update, see above</td> <td class="tab">same as 02</td>
+<tr><td class="nowrap">04<scid>-var-evaluate-expression</td> + <td class="tab">views idle update</td> + <td class="tab">same as 02</td></tr> + <tr><td class="nowrap"> </td><td class="tab"> </td><td class="tab"> </td></tr>
<tr><td class="nowrap">05</td> @@ -222,7 +230,7 @@ <td class="tab">mark data views as dirty</td></tr>
<tr><td class="nowrap">070<scid>-var-delete</td> - <td class="tab">un-<em>Apply</em> inspect</td> + <td class="tab">un-<em>Apply</em> inspect, invalid variable</td> <td class="tab">delete all children, clear columns</td></tr>
<tr><td class="nowrap">071<scid>-var-delete</td>
Modified: scope/docs/scope.html 30 files changed, 23 insertions(+), 7 deletions(-) =================================================================== @@ -60,6 +60,7 @@ <li><a href="#notes">Notes</a><ul> <li><a href="#editing_values">Editing values</a></li> <li><a href="#keeping_modes">Keeping modes</a></li> + <li><a href="#shared_memory">Shared memory</a></li> <li><a href="#xos4_colors">Sample dark colors</a></li> </ul></li> <li><a href="#pre_faq">Pre-FAQ</a> @@ -440,9 +441,6 @@ <p>A maximum of 16K may be displayed (128 lines * 128 bytes); <em>gdb_buffer_length</em> also limits the size.</p>
-<p><em>Memory</em> empty but <em>Clear</em> available means that the subpage can not be -updated ATM; if you explicitly <em>Clear</em> it, no further updates will take place.</p> - <p><b><a name="console">Debug Console</a></b></p>
<div><table> @@ -621,11 +619,25 @@ <p><b><a name="keeping_modes">Keeping modes</a></b></p>
<p>The 7-bit, .names etc. modes for temporary objects, such as local variables, are not saved. -However, there is a global list with names and modes, and when you change a mode, it's saved +However, there is a global list with names and modes, and when you change a mode, it is saved in that list. Then, when a temporary object is created, Scope searches the list, and sets the modes (if any) for that object. For inspect children, the displayed names are used (including numbers for array elements), not the fully qualified names.</p>
+<p><b><a name="shared_memory">Shared memory</a></b></p> + +<div>Scope does not know which Inspect/Watch expressions are thread and frame dependent, as +well as whether the Memory address and range are process/thread dependent, so their handling +is a compromise.<br> +In particular:</div> +<div class="tab"> +- the values will not be updated if threads exist, but none is selected, or if the selected +thread is running<br> +- for <em>Watches</em> and <em>Inspect</em>, Scope will try to select a frame before +sending the update command(s)<br> +- on a thread or frame change, if the values can not be updated at the moment, they will not +be cleared.</div> + <p><b><a name="xos4_colors">Sample dark colors</a></b></p>
<pre> @@ -670,7 +682,7 @@
<p>A. They must be removed before sending the value to GDB. Leaving them while editing gives the false impression that you can assign selectively, while in fact omitting a "foo = -value, " <em>moves</em> all values left by 1, and changing a name or index has +value," <em>moves</em> all values left by 1, and changing a name or index has <em>no</em> effect.</p>
<p>Q. A "signal `project-before-save' is invalid" warning is displayed on Geany startup, and @@ -693,7 +705,11 @@
<h3><a name="todo">TODO</a></h3>
-<p>See TODO.</p> +<p>Various tests, source code checks etc.<br> +Format (natural, decimal...) for Watches?<br> +Add clear icon to entries? not very useful.<br> +Don't remove [index] along with member names?<br> +libtool support / exec wrapper support.</p>
<h3><a name="not_todo">Not TODO</a></h3>
@@ -722,7 +738,7 @@
<b><a name="copyright">Copyright</a></b>
-<p>Scope 0.90, Copyright (C) 2013 Dimitar Toshkov Zhekov</p> +<p>Scope 0.91, 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/debug.c 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -431,6 +431,7 @@ void on_debug_loaded(GArray *nodes) { breaks_apply(); inspects_apply(); + view_dirty(VIEW_WATCHES);
if (program_temp_breakpoint) {
Modified: scope/src/debug.h 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -26,6 +26,7 @@ DS_READY = 0x04, /* at prompt, has threads, none/running thread selected */ DS_DEBUG = 0x08, /* at prompt, has threads, stopped thread selected */ DS_HANGING = 0x10, /* at prompt, no threads */ + DS_VARIABLE = 0x18, DS_SENDABLE = 0x1C, DS_NOT_BUSY = 0x1D, DS_ACTIVE = 0x1E,
Modified: scope/src/inspect.c 121 files changed, 94 insertions(+), 27 deletions(-) =================================================================== @@ -275,32 +275,61 @@ void on_inspect_variable(GArray *nodes) } }
-void on_inspect_format(GArray *nodes) +static void inspect_set(GArray *nodes, const char *value, gint format) { - const char *s = parse_lead_value(nodes); - const char *value = parse_find_value(nodes, "value"); - gint format; - - for (format = FORMAT_NATURAL; format < FORMAT_COUNT; format++) - if (!strcmp(inspect_formats[format], s)) - break; + const char *token = parse_grab_token(nodes); + GtkTreeIter iter;
- iff (format < FORMAT_COUNT, "bad format") + if (inspect_find(&iter, FALSE, token)) { - const char *token = parse_grab_token(nodes); - GtkTreeIter iter; - - if (inspect_find(&iter, FALSE, token)) + if (!value || *value) { gchar *display = inspect_redisplay(&iter, value, NULL);
scp_tree_store_set(store, &iter, INSPECT_DISPLAY, display, INSPECT_VALUE, - value, INSPECT_FORMAT, format, -1); + value, -1); g_free(display); } + else + { + scp_tree_store_get(store, &iter, INSPECT_VALUE, &value, -1); + + if (value) + { + scp_tree_store_set(store, &iter, INSPECT_DISPLAY, "??", INSPECT_VALUE, + NULL); + } + } + + if (format < FORMAT_COUNT) + scp_tree_store_set(store, &iter, INSPECT_FORMAT, format, -1); } }
+void on_inspect_format(GArray *nodes) +{ + const char *fmtstr = parse_lead_value(nodes); + gint format; + + for (format = FORMAT_NATURAL; format < FORMAT_COUNT; format++) + if (!strcmp(inspect_formats[format], fmtstr)) + break; + + iff (format < FORMAT_COUNT, "bad format") + inspect_set(nodes, parse_find_value(nodes, "value"), format); +} + +void on_inspect_evaluate(GArray *nodes) +{ + inspect_set(nodes, parse_lead_value(nodes), FORMAT_COUNT); +} + +void on_inspect_assign(GArray *nodes) +{ + on_inspect_evaluate(nodes); + views_data_dirty(DS_BUSY); +} + static void inspect_node_append(const ParseNode *node, GtkTreeIter *parent) { GArray *nodes = (GArray *) node->value; @@ -415,7 +444,7 @@ static void inspect_node_change(const ParseNode *node, G_GNUC_UNUSED gpointer gd ParseVariable var; GtkTreeIter iter;
- if (parse_variable(nodes, &var, "new_numchild") && + if (parse_variable(nodes, &var, "new_num_children") && inspect_find(&iter, TRUE, var.name)) { const char *in_scope = parse_find_value(nodes, "in_scope"); @@ -451,9 +480,16 @@ static void inspect_node_change(const ParseNode *node, G_GNUC_UNUSED gpointer gd } }
+static gboolean query_all_inspects = FALSE; + void on_inspect_changelist(GArray *nodes) { - parse_foreach(parse_lead_array(nodes), (GFunc) inspect_node_change, NULL); + GArray *changelist = parse_lead_array(nodes); + + if (parse_grab_token(nodes)) + parse_foreach(changelist, (GFunc) inspect_node_change, NULL); + else if (changelist->len) + query_all_inspects = TRUE; }
static void inspect_apply(GtkTreeIter *iter) @@ -491,11 +527,37 @@ void on_inspect_signal(const char *name) void inspects_clear(void) { store_foreach(store, (GFunc) inspect_iter_clear, NULL); + query_all_inspects = FALSE; +} + +static gint inspect_iter_refresh(ScpTreeStore *store, GtkTreeIter *iter, gpointer gdata) +{ + const char *var1; + gint numchild; + + scp_tree_store_get(store, iter, INSPECT_VAR1, &var1, INSPECT_NUMCHILD, &numchild, -1); + + if (var1 && !numchild) + { + debug_send_format(F, "0%c%d-var-evaluate-expression %s", GPOINTER_TO_INT(gdata), + inspect_get_scid(iter), var1); + } + return FALSE; +} + +static void inspects_send_refresh(char token) +{ + scp_tree_store_traverse(store, TRUE, NULL, NULL, inspect_iter_refresh, NULL); + query_all_inspects = FALSE; }
gboolean inspects_update(void) { - debug_send_command(N, "04-var-update 1 *"); + if (query_all_inspects) + inspects_send_refresh('4'); + else + debug_send_command(F, "04-var-update 1 *"); + return TRUE; }
@@ -603,8 +665,13 @@ void inspect_add(const gchar *text) static void on_inspect_display_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { - view_display_edited(store, debug_state() & DS_SENDABLE, path_str, "07-var-assign %s %s", - new_text); + GtkTreeIter iter; + char *format; + + scp_tree_store_get_iter_from_string(store, &iter, path_str); + format = g_strdup_printf("07%d-var-assign %%s %%s", inspect_get_scid(&iter)); + view_display_edited(store, debug_state() & DS_VARIABLE, path_str, format, new_text); + g_free(format); }
static const TreeCell inspect_cells[] = @@ -626,7 +693,7 @@ void inspects_update_state(DebugState state) const char *var1 = NULL; gint numchild = 0;
- if (state & DS_SENDABLE) + if (state & DS_VARIABLE) { scp_tree_store_get(store, &iter, INSPECT_VAR1, &var1, INSPECT_NUMCHILD, &numchild, -1); @@ -716,7 +783,7 @@ void inspects_save(GKeyFile *config)
static void on_inspect_refresh(G_GNUC_UNUSED const MenuItem *menu_item) { - debug_send_command(N, "-var-update 1 *"); + inspects_send_refresh('2'); }
static void on_inspect_add(G_GNUC_UNUSED const MenuItem *menu_item) @@ -800,7 +867,7 @@ static void on_inspect_expand(G_GNUC_UNUSED const MenuItem *menu_item) INSPECT_COUNT, gtk_spin_button_get_value_as_int(expand_count), INSPECT_EXPAND, gtk_toggle_button_get_active(expand_automatic), -1);
- if (debug_state() & DS_SENDABLE) + if (debug_state() & DS_VARIABLE) inspect_expand(&iter); else plugin_beep(); @@ -891,10 +958,10 @@ static void on_inspect_delete(G_GNUC_UNUSED const MenuItem *menu_item) }
#define DS_EDITABLE (DS_BASICS | DS_EXTRA_2) -#define DS_APPLIABLE (DS_SENDABLE | DS_EXTRA_3) -#define DS_EXPANDABLE (DS_SENDABLE | DS_EXTRA_4) +#define DS_APPLIABLE (DS_VARIABLE | DS_EXTRA_3) +#define DS_EXPANDABLE (DS_VARIABLE | DS_EXTRA_4) #define DS_COPYABLE (DS_BASICS | DS_EXTRA_1) -#define DS_FORMATABLE (DS_NOT_BUSY | DS_EXTRA_1) +#define DS_FORMATABLE (DS_INACTIVE | DS_VARIABLE | DS_EXTRA_1) #define DS_REPARSABLE (DS_BASICS | DS_EXTRA_1) #define DS_DELETABLE (DS_NOT_BUSY | DS_EXTRA_1)
@@ -904,7 +971,7 @@ static void on_inspect_delete(G_GNUC_UNUSED const MenuItem *menu_item)
static MenuItem inspect_menu_items[] = { - { "inspect_refresh", on_inspect_refresh, DS_SENDABLE, NULL, NULL }, + { "inspect_refresh", on_inspect_refresh, DS_VARIABLE, 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 }, @@ -976,7 +1043,7 @@ static gboolean inspect_test_expand_row(G_GNUC_UNUSED GtkTreeView *tree_view, if (var1 || !expand) return FALSE;
- if (debug_state() & DS_SENDABLE) + if (debug_state() & DS_VARIABLE) inspect_expand(iter); else plugin_blink();
Modified: scope/src/inspect.h 2 files changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -21,6 +21,8 @@
void on_inspect_variable(GArray *nodes); void on_inspect_format(GArray *nodes); +void on_inspect_evaluate(GArray *nodes); +void on_inspect_assign(GArray *nodes); void on_inspect_children(GArray *nodes); void on_inspect_ndeleted(GArray *nodes); void on_inspect_path_expr(GArray *nodes);
Modified: scope/src/memory.c 12 files changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -37,7 +37,7 @@ enum static void on_memory_bytes_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { - if (*new_text && (debug_state() & DS_SENDABLE)) + if (*new_text && (debug_state() & DS_VARIABLE)) { GtkTreeIter iter; const char *addr, *bytes; @@ -335,21 +335,21 @@ static void on_memory_group_update(const MenuItem *menu_item) on_memory_refresh(menu_item); }
-#define DS_FRESHABLE (DS_SENDABLE | DS_EXTRA_2) +#define DS_FRESHABLE (DS_VRIABLE | DS_EXTRA_2) #define DS_COPYABLE (DS_BASICS | DS_EXTRA_1) #define DS_CLEARABLE (DS_ACTIVE | DS_EXTRA_2)
#define GROUP_ITEM(count, POWER) \ - { ("memory_group_"count), on_memory_group_update, DS_SENDABLE, NULL, \ + { ("memory_group_"count), on_memory_group_update, DS_VARIABLE, NULL, \ GINT_TO_POINTER(POWER) }
static MenuItem memory_menu_items[] = { - { "memory_refresh", on_memory_refresh, DS_FRESHABLE, NULL, NULL }, - { "memory_read", on_memory_read, DS_SENDABLE, NULL, NULL }, + { "memory_refresh", on_memory_refresh, DS_VARIABLE, NULL, NULL }, + { "memory_read", on_memory_read, DS_VARIABLE, NULL, NULL }, { "memory_copy", on_memory_copy, DS_COPYABLE, NULL, NULL }, { "memory_clear", on_memory_clear, DS_CLEARABLE, NULL, NULL }, - { "memory_group", on_memory_group_display, DS_SENDABLE, NULL, NULL }, + { "memory_group", on_memory_group_display, DS_VARIABLE, NULL, NULL }, GROUP_ITEM("1", 0), GROUP_ITEM("2", 1), GROUP_ITEM("4", 2),
Modified: scope/src/parse.c 3 files changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -102,8 +102,11 @@ static void on_data_modified(G_GNUC_UNUSED GArray *nodes) { "^done,stack-args=[", on_stack_arguments, '*', '\0', 1 }, { "^done,variables=[", on_local_variables, '*', '\0', 1 }, { "^done,line="", on_debug_list_source, '2', '\0', 2 }, + { "^done,value="", on_inspect_evaluate, '2', '\0', 1 }, { "^done,value="", on_tooltip_value, '3', '\0', 1 }, + { "^done,value="", on_inspect_evaluate, '4', '\0', 1 }, { "^done,value="", on_watch_value, '6', '\0', 1 }, + { "^done,value="", on_inspect_assign, '7', '\0', 1 }, { "^done,value="", on_menu_evaluate_value, '8', '\0', 1 }, { "^done,name="", on_inspect_variable, '7', '\0', 1 }, { "^done,format="", on_inspect_format, '7', '\0', 1 },
Modified: scope/src/register.c 21 files changed, 10 insertions(+), 11 deletions(-) =================================================================== @@ -70,6 +70,8 @@ static void register_node_update(const ParseNode *node, GString *commands[]) } }
+static gboolean query_all_registers = TRUE; + static void registers_send_update(GArray *nodes, char token) { GString *commands[FORMAT_COUNT]; @@ -88,7 +90,10 @@ static void registers_send_update(GArray *nodes, char token) if (nodes) parse_foreach(nodes, (GFunc) register_node_update, commands); else + { store_foreach(store, (GFunc) register_iter_update, commands); + query_all_registers = FALSE; + }
for (format = 0; format < FORMAT_COUNT; format++) { @@ -152,18 +157,17 @@ void on_register_names(GArray *nodes) registers_send_update(NULL, '2'); }
-static gboolean query_all_registers = TRUE; - void on_register_changes(GArray *nodes) { const char *token = parse_grab_token(nodes); + GArray *changes = parse_lead_array(nodes);
if (token) { if (utils_matches_frame(token)) - registers_send_update(parse_lead_array(nodes), '4'); + registers_send_update(changes, '4'); } - else + else if (changes->len) query_all_registers = TRUE; /* external changes */ }
@@ -278,12 +282,7 @@ void on_register_values(GArray *nodes) ValueAction va = { *token - '0', utils_matches_frame(token + 1) };
if (va.format < FORMAT_COUNT || va.assign) - { parse_foreach(parse_lead_array(nodes), (GFunc) register_node_value, &va); - - if (va.assign) - query_all_registers = FALSE; - } }
static void on_register_display_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, @@ -315,7 +314,7 @@ void registers_clear(void)
gboolean registers_update(void) { - if (g_strcmp0(frame_id, "0") && view_stack_update()) + if (view_frame_update()) return FALSE;
if (frame_id) @@ -481,7 +480,7 @@ static void on_register_query(G_GNUC_UNUSED const MenuItem *menu_item)
#define DS_FRESHABLE DS_DEBUG #define DS_COPYABLE (DS_BASICS | DS_EXTRA_1) -#define DS_FORMATABLE (DS_INACTIVE | DS_DEBUG | DS_HANGING | DS_EXTRA_2) +#define DS_FORMATABLE (DS_INACTIVE | DS_DEBUG | DS_EXTRA_2) #define DS_QUERABLE DS_SENDABLE
#define FORMAT_ITEM(format, FORMAT) \
Modified: scope/src/scope.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -32,7 +32,7 @@ PLUGIN_VERSION_CHECK(215)
PLUGIN_SET_TRANSLATABLE_INFO(LOCALEDIR, GETTEXT_PACKAGE, _("Scope Debugger"), - _("Relatively simple GDB front-end."), "0.90" , + _("Relatively simple GDB front-end."), "0.91" , "Dimitar Toshkov Zhekov dimitar.zhekov@gmail.com")
/* Keybinding(s) */
Modified: scope/src/tooltip.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -173,11 +173,11 @@ void tooltip_remove(GeanyEditor *editor)
if (gtk_widget_get_has_tooltip(widget)) { - gulong tooltip_id = g_signal_handler_find(widget, G_SIGNAL_MATCH_ID, + gulong query_tooltip_id = g_signal_handler_find(widget, G_SIGNAL_MATCH_ID, g_signal_lookup("query-tooltip", GTK_TYPE_WIDGET), 0, NULL, NULL, NULL);
- if (tooltip_id) - g_signal_handler_disconnect(widget, tooltip_id); + if (query_tooltip_id) + g_signal_handler_disconnect(widget, query_tooltip_id); gtk_widget_set_has_tooltip(widget, FALSE); } }
Modified: scope/src/views.c 6 files changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -47,10 +47,10 @@ { FALSE, VC_NONE, breaks_clear, breaks_update, FALSE, DS_SENDABLE }, { FALSE, VC_DATA, stack_clear, stack_update, TRUE, DS_DEBUG }, { FALSE, VC_FRAME, locals_clear, locals_update, TRUE, DS_DEBUG }, - { FALSE, VC_FRAME, watches_clear, watches_update, TRUE, DS_DEBUG }, - { FALSE, VC_DATA, memory_clear, memory_update, TRUE, DS_SENDABLE }, + { 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_DATA, inspects_clear, inspects_update, FALSE, DS_DEBUG }, + { FALSE, VC_FRAME, inspects_clear, inspects_update, FALSE, DS_VARIABLE }, { 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 }
Modified: scope/src/views.h 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -42,6 +42,7 @@ void views_clear(void); void views_update(DebugState state); gboolean view_stack_update(void); +#define view_frame_update() (g_strcmp0(frame_id, "0") && view_stack_update()) void view_local_update(void);
void on_view_changed(GtkNotebook *notebook, gpointer page, gint page_num, gpointer gdata);
Modified: scope/src/watch.c 10 files changed, 5 insertions(+), 5 deletions(-) =================================================================== @@ -88,7 +88,7 @@ static void on_watch_expr_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, static void on_watch_display_edited(G_GNUC_UNUSED GtkCellRendererText *renderer, gchar *path_str, gchar *new_text, G_GNUC_UNUSED gpointer gdata) { - view_display_edited(store, debug_state() & DS_SENDABLE, path_str, "07-gdb-set var %s=%s", + view_display_edited(store, debug_state() & DS_VARIABLE, path_str, "07-gdb-set var %s=%s", new_text); }
@@ -144,7 +144,7 @@ void watches_clear(void)
gboolean watches_update(void) { - if (g_strcmp0(frame_id, "0") && view_stack_update()) + if (view_frame_update()) return FALSE;
store_foreach(store, (GFunc) watch_iter_update, GPOINTER_TO_INT(FALSE)); @@ -177,7 +177,7 @@ void watch_add(const gchar *text)
void watches_update_state(DebugState state) { - g_object_set(watch_display, "editable", (state & DS_SENDABLE) != 0, NULL); + g_object_set(watch_display, "editable", (state & DS_VARIABLE) != 0, NULL); }
void watches_delete_all(void) @@ -294,14 +294,14 @@ static void on_watch_delete(G_GNUC_UNUSED const MenuItem *menu_item) }
#define DS_COPYABLE (DS_BASICS | DS_EXTRA_1) -#define DS_MODIFYABLE (DS_SENDABLE | DS_EXTRA_1) +#define DS_MODIFYABLE (DS_VARIABLE | DS_EXTRA_1) #define DS_INSPECTABLE (DS_NOT_BUSY | DS_EXTRA_1) #define DS_REPARSABLE (DS_BASICS | DS_EXTRA_1) #define DS_DELETABLE (DS_BASICS | DS_EXTRA_1)
static MenuItem watch_menu_items[] = { - { "watch_refresh", on_watch_refresh, DS_SENDABLE, NULL, NULL }, + { "watch_refresh", on_watch_refresh, DS_VARIABLE, NULL, NULL }, { "watch_unsorted", on_watch_unsorted, 0, NULL, NULL }, { "watch_add", on_watch_add, 0, NULL, NULL }, { "watch_copy", on_watch_copy, DS_COPYABLE, NULL, NULL },
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org