[geany/geany-plugins] dd9724: scope - memory fixes, removed an unused struct
Dimitar Zhekov
git-noreply at xxxxx
Sat Oct 26 17:36:10 UTC 2013
Branch: refs/heads/master
Author: Dimitar Zhekov <dimitar.zhekov at gmail.com>
Committer: Dimitar Zhekov <dimitar.zhekov at gmail.com>
Date: Sat, 26 Oct 2013 17:36:10 UTC
Commit: dd9724697a9cd34732966c998d9d1f59ff473ea8
https://github.com/geany/geany-plugins/commit/dd9724697a9cd34732966c998d9d1f59ff473ea8
Log Message:
-----------
scope - memory fixes, removed an unused struct
Modified Paths:
--------------
scope/ChangeLog
scope/src/memory.c
scope/src/prefs.c
Modified: scope/ChangeLog
10 files changed, 10 insertions(+), 0 deletions(-)
===================================================================
@@ -1,3 +1,13 @@
+2013-10-26 Dimitar Zhekov <dimitar.zhekov at gmail.com>
+
+ * src/memory.c:
+ Handle offset (albeit it seems that gdb just adds it to start).
+ Fix count for memory block with holes.
+ Use g_ascii_strtoull() instead of sscanf.
+ * src/prefs.c:
+ Removed an unused structure.
+
+
2013-10-12 Dimitar Zhekov <dimitar.zhekov at gmail.com>
* src/debug.c:
Modified: scope/src/memory.c
8 files changed, 6 insertions(+), 2 deletions(-)
===================================================================
@@ -140,6 +140,8 @@ static void write_block(guint64 start, const char *contents, guint count, const
{
if (!memory_count)
memory_start = start;
+ else if (memory_count < MAX_BYTES)
+ memory_count = start - memory_start;
while (memory_count < MAX_BYTES)
{
@@ -208,14 +210,16 @@ static void memory_node_read(const ParseNode *node, const char *maddr)
{
GArray *nodes = (GArray *) node->value;
const char *begin = parse_find_value(nodes, "begin");
+ const char *offset = parse_find_value(nodes, "offset");
const char *contents = parse_find_value(nodes, "contents");
iff (begin && contents, "memory: no begin or contents")
{
- guint64 start;
+ guint64 start = g_ascii_strtoull(begin, NULL, 0);
guint64 count = strlen(contents) / 2;
- sscanf(begin, "%" G_GINT64_MODIFIER "i", &start);
+ if (offset)
+ start += g_ascii_strtoull(offset, NULL, 0);
iff (count, "memory: contents too short")
write_block(start, contents, count, maddr);
Modified: scope/src/prefs.c
6 files changed, 0 insertions(+), 6 deletions(-)
===================================================================
@@ -119,12 +119,6 @@ void prefs_apply(GeanyDocument *doc)
static StashGroup *terminal_group;
static StashGroup *marker_group[MARKER_COUNT];
-typedef struct _VerticalLabel
-{
- const char *name;
- const gchar *label;
-} VerticalLabel;
-
static void load_scope_prefs(GKeyFile *config)
{
guint i;
--------------
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