From 5d5021647dbce1a933576243b9d54281a88eb3b5 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 17 May 2010 01:15:20 +0000 Subject: 2010-05-16 Michael Snyder * 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. --- gdb/target-memory.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gdb/target-memory.c') 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); } -- cgit v1.1