aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-memory.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-17 01:15:20 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-17 01:15:20 +0000
commit5d5021647dbce1a933576243b9d54281a88eb3b5 (patch)
tree9cc50cfe6d9329223b5830db2770152391c17b19 /gdb/target-memory.c
parent3a6f1766e1c8ec54e2baa00f51d375c554ee63b3 (diff)
downloadgdb-5d5021647dbce1a933576243b9d54281a88eb3b5.zip
gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.tar.gz
gdb-5d5021647dbce1a933576243b9d54281a88eb3b5.tar.bz2
2010-05-16 Michael Snyder <msnyder@vmware.com>
* target.c: White space. * target-descriptions.c: White space. * target-memory.c: White space. * thread.c: White space. * top.c: White space. * tracepoint.c: White space. * trad-frame.c: White space. * tramp-frame.c: White space. * ui-file.c: White space. * ui-out.c: White space. * user-regs.c: White space. * utils.c: White space.
Diffstat (limited to 'gdb/target-memory.c')
-rw-r--r--gdb/target-memory.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/target-memory.c b/gdb/target-memory.c
index 8479353..b864d50 100644
--- a/gdb/target-memory.c
+++ b/gdb/target-memory.c
@@ -84,6 +84,7 @@ claim_memory (VEC(memory_write_request_s) *blocks,
{
struct memory_write_request *n =
VEC_safe_push (memory_write_request_s, *result, NULL);
+
*n = *r;
n->begin = claimed_begin;
n->end = claimed_end;
@@ -116,8 +117,8 @@ split_regular_and_flash_blocks (VEC(memory_write_request_s) *blocks,
while (1)
{
VEC(memory_write_request_s) **r;
- region = lookup_mem_region (cur_address);
+ region = lookup_mem_region (cur_address);
r = region->attrib.mode == MEM_FLASH ? flash_blocks : regular_blocks;
cur_address = region->hi;
claim_memory (blocks, r, region->lo, region->hi);
@@ -175,6 +176,7 @@ blocks_to_erase (VEC(memory_write_request_s) *written)
{
struct memory_write_request *n =
VEC_safe_push (memory_write_request_s, result, NULL);
+
memset (n, 0, sizeof (struct memory_write_request));
n->begin = begin;
n->end = end;
@@ -255,6 +257,7 @@ compute_garbled_blocks (VEC(memory_write_request_s) *erased_blocks,
{
struct memory_write_request *n =
VEC_safe_push (memory_write_request_s, result, NULL);
+
memset (n, 0, sizeof (struct memory_write_request));
n->begin = erased.begin;
n->end = written->begin;
@@ -300,6 +303,7 @@ static void
cleanup_write_requests_vector (void *p)
{
VEC(memory_write_request_s) **v = p;
+
VEC_free (memory_write_request_s, *v);
}