[geany/geany-plugins] a48d7c: scope - small fixes and improvements
Dimitar Zhekov
git-noreply at xxxxx
Sat Oct 12 15:31:07 UTC 2013
Branch: refs/heads/master
Author: Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer: Dimitar Zhekov <dimitar.zhekov at gmail.com>
Date: Sat, 12 Oct 2013 15:31:07 UTC
Commit: a48d7c2816cbd4417ac25fb43c578de97032b9e7
https://github.com/geany/geany-plugins/commit/a48d7c2816cbd4417ac25fb43c578de97032b9e7
Log Message:
-----------
scope - small fixes and improvements
Modified Paths:
--------------
scope/ChangeLog
scope/src/debug.c
scope/src/memory.c
scope/src/prefs.c
Modified: scope/ChangeLog
13 files changed, 12 insertions(+), 1 deletions(-)
===================================================================
@@ -1,4 +1,15 @@
-2013-07-25 Dimitar Zhekov <dimitar.zhekov at gmail.com>
+2013-10-12 Dimitar Zhekov <dimitar.zhekov at gmail.com>
+
+ * src/debug.c:
+ Fixed a lapsus which prevented gdb stdout resync on overflow.
+ * src/memory.c:
+ Improved re-selection of the current line.
+ * src/memory.c, src/pref.c:
+ Decreased the maximum memory block size to 15.5K and increased
+ the default gdb stdout buffer size to 32K to match each other.
+
+
+2013-09-25 Dimitar Zhekov <dimitar.zhekov at gmail.com>
* src/scope.c:
Register ScpTreeStore dynamically, making Scope unloadable again.
Modified: scope/src/debug.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -307,7 +307,7 @@ static gboolean source_dispatch(G_GNUC_UNUSED GSource *source,
else
{
reading_pos++;
- leading_receive = FALSE;
+ leading_receive = TRUE;
}
}
Modified: scope/src/memory.c
31 files changed, 12 insertions(+), 19 deletions(-)
===================================================================
@@ -134,9 +134,9 @@ static void memory_configure(void)
static guint64 memory_start;
static guint memory_count = 0;
-#define MAX_BYTES (128 * MAX_BYTES_PER_LINE)
+#define MAX_BYTES (124 * MAX_BYTES_PER_LINE)
-static void write_block(guint64 start, const char *contents, guint count)
+static void write_block(guint64 start, const char *contents, guint count, const char *maddr)
{
if (!memory_count)
memory_start = start;
@@ -149,8 +149,6 @@ static void write_block(guint64 start, const char *contents, guint count)
GString *ascii = g_string_new(" ");
gint n = 0;
- scp_tree_store_append(store, &iter, NULL);
-
while (n < bytes_per_line)
{
char locale;
@@ -185,8 +183,10 @@ static void write_block(guint64 start, const char *contents, guint count)
g_string_append_c(bytes, ' ');
}
- scp_tree_store_set(store, &iter, MEMORY_ADDR, addr, MEMORY_BYTES, bytes->str,
- MEMORY_ASCII, ascii->str, -1);
+ scp_tree_store_append_with_values(store, &iter, NULL, MEMORY_ADDR, addr,
+ MEMORY_BYTES, bytes->str, MEMORY_ASCII, ascii->str, -1);
+ if (!g_strcmp0(addr, maddr))
+ gtk_tree_selection_select_iter(selection, &iter);
g_free(addr);
g_string_free(bytes, TRUE);
@@ -202,7 +202,7 @@ static void write_block(guint64 start, const char *contents, guint count)
dc_error("memory: too much data");
}
-static void memory_node_read(const ParseNode *node, G_GNUC_UNUSED gpointer gdata)
+static void memory_node_read(const ParseNode *node, const char *maddr)
{
iff (node->type == PT_ARRAY, "memory: contains value")
{
@@ -218,7 +218,7 @@ static void memory_node_read(const ParseNode *node, G_GNUC_UNUSED gpointer gdata
sscanf(begin, "%" G_GINT64_MODIFIER "i", &start);
iff (count, "memory: contents too short")
- write_block(start, contents, count);
+ write_block(start, contents, count, maddr);
}
}
}
@@ -228,10 +228,10 @@ void on_memory_read_bytes(GArray *nodes)
if (pointer_size <= MAX_POINTER_SIZE)
{
GtkTreeIter iter;
- char *addr = NULL;
+ char *maddr = NULL;
if (gtk_tree_selection_get_selected(selection, NULL, &iter))
- gtk_tree_model_get((GtkTreeModel *) store, &iter, MEMORY_ADDR, &addr, -1);
+ gtk_tree_model_get((GtkTreeModel *) store, &iter, MEMORY_ADDR, &maddr, -1);
store_clear(store);
memory_count = 0;
@@ -243,15 +243,8 @@ void on_memory_read_bytes(GArray *nodes)
gtk_tree_view_column_queue_resize(get_column("memory_ascii_column"));
}
- parse_foreach(parse_lead_array(nodes), (GFunc) memory_node_read,
- GINT_TO_POINTER(TRUE));
-
- if (addr)
- {
- if (store_find(store, &iter, MEMORY_ADDR, addr))
- utils_tree_set_cursor(selection, &iter, -1);
- g_free(addr);
- }
+ parse_foreach(parse_lead_array(nodes), (GFunc) memory_node_read, maddr);
+ g_free(maddr);
}
}
Modified: scope/src/prefs.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -233,7 +233,7 @@ void prefs_init(void)
group = stash_group_new("scope");
stash_group_add_string(group, &pref_gdb_executable, "gdb_executable", "gdb");
stash_group_add_boolean(group, &pref_gdb_async_mode, "gdb_async_mode", FALSE);
- stash_group_add_integer(group, &pref_gdb_buffer_length, "gdb_buffer_length", 16383);
+ stash_group_add_integer(group, &pref_gdb_buffer_length, "gdb_buffer_length", 32767);
stash_group_add_integer(group, &pref_gdb_wait_death, "gdb_wait_death", 20);
#ifndef G_OS_UNIX
stash_group_add_integer(group, &pref_gdb_send_interval, "gdb_send_interval", 5);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list