/* Parts of target interface that deal with accessing memory and memory-like
objects.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GDB.
{
struct memory_write_request *n =
VEC_safe_push (memory_write_request_s, *result, NULL);
- memset (n, 0, sizeof (struct memory_write_request));
+
+ *n = *r;
n->begin = claimed_begin;
n->end = claimed_end;
- n->data = r->data + (claimed_begin - r->begin);
+ n->data += claimed_begin - r->begin;
}
}
}
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);
{
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;
{
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;
cleanup_write_requests_vector (void *p)
{
VEC(memory_write_request_s) **v = p;
+
VEC_free (memory_write_request_s, *v);
}
{
LONGEST len;
- len = target_write_with_progress (¤t_target,
+ len = target_write_with_progress (current_target.beneath,
TARGET_OBJECT_MEMORY, NULL,
r->data, r->begin, r->end - r->begin,
progress_cb, r->baton);