GDB (xrefs)

Functions
/tmp/gdb-8.1/gdb/target-memory.c File Reference
`#include "defs.h"`
`#include "vec.h"`
`#include "target.h"`
`#include "memory-map.h"`
`#include "gdb_sys_time.h"`
`#include <algorithm>`

Go to the source code of this file.

## Functions
static int | compare_block_starting_address (const void *a, const void *b)
static void | claim_memory (VEC(memory_write_request_s) *blocks, VEC(memory_write_request_s) **result, ULONGEST begin, ULONGEST end)
static void | split_regular_and_flash_blocks (VEC(memory_write_request_s) *blocks, VEC(memory_write_request_s) **regular_blocks, VEC(memory_write_request_s) **flash_blocks)
static void | block_boundaries (CORE_ADDR address, CORE_ADDR *begin, CORE_ADDR *end)
static | VEC (memory_write_request_s)
static void | cleanup_request_data (void *p)
static void | cleanup_write_requests_vector (void *p)
int | target_write_memory_blocks (VEC(memory_write_request_s) *requests, enum flash_preserve_mode preserve_flash_p, void(*progress_cb)(ULONGEST, void *))

## Function Documentation

## ◆ block_boundaries()

static void block_boundaries | ( | CORE_ADDR | address,
|  | CORE_ADDR * | begin,
|  | CORE_ADDR * | end
| ) |  |
| static

Definition at line 137 of file target-memory.c.

References mem_region::attrib, mem_attrib::blocksize, gdb_assert, mem_region::lo, lookup_mem_region(), MEM_FLASH, and mem_attrib::mode.

Referenced by VEC().

## ◆ claim_memory()

static void claim_memory | ( | VEC(memory_write_request_s) * | blocks,
|  | VEC(memory_write_request_s) ** | result,
|  | ULONGEST | begin,
|  | ULONGEST | end
| ) |  |
| static

Definition at line 52 of file target-memory.c.

References memory_write_request::begin, memory_write_request::data, memory_write_request::end, VEC_iterate, and VEC_safe_push.

Referenced by split_regular_and_flash_blocks().

## ◆ cleanup_request_data()

static void cleanup_request_data | ( | void * | p | ) |
| static

Definition at line 296 of file target-memory.c.

References memory_write_request::data, VEC(), VEC_iterate, and xfree().

Referenced by target_write_memory_blocks().

## ◆ cleanup_write_requests_vector()

static void cleanup_write_requests_vector | ( | void * | p | ) |
| static

Definition at line 307 of file target-memory.c.

References VEC(), and VEC_free.

Referenced by target_write_memory_blocks().

## ◆ compare_block_starting_address()

static int compare_block_starting_address | ( | const void * | a,
|  | const void * | b
| ) |  |
| static

Definition at line 30 of file target-memory.c.

References memory_write_request::begin.

Referenced by target_write_memory_blocks().

## ◆ split_regular_and_flash_blocks()

static void split_regular_and_flash_blocks | ( | VEC(memory_write_request_s) * | blocks,
|  | VEC(memory_write_request_s) ** | regular_blocks,
|  | VEC(memory_write_request_s) ** | flash_blocks
| ) |  |
| static

Definition at line 101 of file target-memory.c.

References mem_region::attrib, claim_memory(), mem_region::hi, mem_region::lo, lookup_mem_region(), MEM_FLASH, mem_attrib::mode, and VEC().

Referenced by target_write_memory_blocks().

## ◆ target_write_memory_blocks()

int target_write_memory_blocks | ( | VEC(memory_write_request_s) * | requests,
|  | enum flash_preserve_mode | preserve_flash_p,
|  | void(*)(ULONGEST, void *) | progress_cb
| ) |  |

Definition at line 315 of file target-memory.c.

References _, memory_write_request::baton, memory_write_request::begin, target_ops::beneath, cleanup_request_data(), cleanup_write_requests_vector(), compare_block_starting_address(), current_target, memory_write_request::data, do_cleanups(), memory_write_request::end, err, error(), flash_preserve, gdb_assert, make_cleanup(), null_cleanup(), qsort, split_regular_and_flash_blocks(), target_flash_done(), target_flash_erase(), TARGET_OBJECT_FLASH, TARGET_OBJECT_MEMORY, target_read_memory(), target_write_with_progress(), VEC(), VEC_address, VEC_copy, VEC_empty, VEC_iterate, VEC_length, VEC_safe_push, and xmalloc().

Referenced by generic_load().

## ◆ VEC()

static VEC | ( | memory_write_request_s |  | ) |
| static

Definition at line 159 of file target-memory.c.

References memory_write_request::begin, block_boundaries(), memory_write_request::end, memset(), VEC_empty, VEC_iterate, VEC_last, and VEC_safe_push.

Referenced by cleanup_request_data(), cleanup_write_requests_vector(), split_regular_and_flash_blocks(), and target_write_memory_blocks().