Lines Matching refs:align
79 bool gdb_mem_can_read(const uintptr_t addr, const size_t len, uint8_t *align) in gdb_mem_can_read() argument
90 *align = 1; in gdb_mem_can_read()
98 *align = r->alignment; in gdb_mem_can_read()
100 *align = 1; in gdb_mem_can_read()
110 bool gdb_mem_can_write(const uintptr_t addr, const size_t len, uint8_t *align) in gdb_mem_can_write() argument
121 *align = 1; in gdb_mem_can_write()
129 *align = r->alignment; in gdb_mem_can_write()
131 *align = 1; in gdb_mem_can_write()
299 uint8_t align) in gdb_mem_read_aligned() argument
317 if (align > 4) { in gdb_mem_read_aligned()
323 mem_ptr = UINT_TO_POINTER(ROUND_DOWN(addr, align)); in gdb_mem_read_aligned()
329 pos = addr & (align - 1); in gdb_mem_read_aligned()
330 read_sz = MIN(len, align - pos); in gdb_mem_read_aligned()
344 if (remaining > align) { in gdb_mem_read_aligned()
345 read_sz = align; in gdb_mem_read_aligned()
351 mem_ptr += align; in gdb_mem_read_aligned()
375 uint8_t align; in gdb_mem_read() local
387 if (!gdb_mem_can_read(addr, len, &align)) { in gdb_mem_read()
392 if (align > 1) { in gdb_mem_read()
395 align); in gdb_mem_read()
437 size_t len, uint8_t align) in gdb_mem_write_aligned() argument
456 if (align > 4) { in gdb_mem_write_aligned()
466 mem_ptr = UINT_TO_POINTER(ROUND_DOWN(addr, align)); in gdb_mem_write_aligned()
473 pos = addr & (align - 1); in gdb_mem_write_aligned()
474 write_sz = MIN(len, align - pos); in gdb_mem_write_aligned()
494 if (remaining > align) { in gdb_mem_write_aligned()
495 write_sz = align; in gdb_mem_write_aligned()
504 mem_ptr += align; in gdb_mem_write_aligned()
506 if (write_sz != align) { in gdb_mem_write_aligned()
537 uint8_t align; in gdb_mem_write() local
540 if (!gdb_mem_can_write(addr, len, &align)) { in gdb_mem_write()
545 if (align > 1) { in gdb_mem_write()
546 ret = gdb_mem_write_aligned(buf, addr, len, align); in gdb_mem_write()