aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-ppc-low.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-08-14 09:18:21 -0600
committerTom Tromey <tromey@adacore.com>2019-08-15 07:42:21 -0600
commit4196ab2a6d348f76c0e5e78252e44d9c631636d2 (patch)
tree94cdb8e141b9a10aa46f5234ae0ee5219443b872 /gdb/gdbserver/linux-ppc-low.c
parentc6778d00df0fbc7fe53801717eb934a5d7b9674a (diff)
downloadgdb-4196ab2a6d348f76c0e5e78252e44d9c631636d2.zip
gdb-4196ab2a6d348f76c0e5e78252e44d9c631636d2.tar.gz
gdb-4196ab2a6d348f76c0e5e78252e44d9c631636d2.tar.bz2
Replace write_inferior_memory with target_write_memory
target_write_memory is just a simple wrapper for write_inferior_memory. Because target_write_memory is needed for gdbsupport, and because gdb uses the name "target_write_memory" everywhere, this patch renames write_inferior_memory and removes the wrapper. I think this brings gdb and gdbserver slightly more in sync. gdb/gdbserver/ChangeLog 2019-08-15 Tom Tromey <tromey@adacore.com> * tracepoint.c (write_inferior_data_pointer) (write_inferior_integer, write_inferior_int8) (write_inferior_uinteger, m_tracepoint_action_download) (r_tracepoint_action_download, x_tracepoint_action_download) (l_tracepoint_action_download, clear_inferior_trace_buffer) (download_agent_expr, download_tracepoint_1) (download_trace_state_variables, upload_fast_traceframes): Update. * server.c (gdb_write_memory): Update. * remote-utils.c (relocate_instruction): Update. * proc-service.c (ps_pdwrite): Update. * mem-break.c (remove_memory_breakpoint) (delete_fast_tracepoint_jump, set_fast_tracepoint_jump) (uninsert_fast_tracepoint_jumps_at) (reinsert_fast_tracepoint_jumps_at): Update. * linux-x86-low.c (append_insns) (i386_install_fast_tracepoint_jump_pad) (amd64_write_goto_address, i386_write_goto_address): Update. * linux-s390-low.c (append_insns, s390_write_goto_address): Update. * linux-ppc-low.c (ppc_relocate_instruction) (ppc_install_fast_tracepoint_jump_pad, emit_insns) (ppc_write_goto_address): Update. * linux-aarch64-low.c (append_insns): Update. * target.h (struct target_ops): Update. (write_inferior_memory): Don't declare. * target.c (target_write_memory): Rename from write_inferior_memory. Remove old target_write_memory.
Diffstat (limited to 'gdb/gdbserver/linux-ppc-low.c')
-rw-r--r--gdb/gdbserver/linux-ppc-low.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index f17f05a..8a0965b 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -1535,12 +1535,12 @@ ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
/* Jump over the unconditional branch. */
insn = (insn & ~0xfffc) | 0x8;
- write_inferior_memory (*to, (unsigned char *) &insn, 4);
+ target_write_memory (*to, (unsigned char *) &insn, 4);
*to += 4;
/* Build a unconditional branch and copy LK bit. */
insn = (18 << 26) | (0x3fffffc & newrel) | (insn & 0x3);
- write_inferior_memory (*to, (unsigned char *) &insn, 4);
+ target_write_memory (*to, (unsigned char *) &insn, 4);
*to += 4;
return;
@@ -1563,14 +1563,14 @@ ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
bdnz_insn |= (insn ^ (1 << 22)) & (1 << 22);
bf_insn |= (insn ^ (1 << 24)) & (1 << 24);
- write_inferior_memory (*to, (unsigned char *) &bdnz_insn, 4);
+ target_write_memory (*to, (unsigned char *) &bdnz_insn, 4);
*to += 4;
- write_inferior_memory (*to, (unsigned char *) &bf_insn, 4);
+ target_write_memory (*to, (unsigned char *) &bf_insn, 4);
*to += 4;
/* Build a unconditional branch and copy LK bit. */
insn = (18 << 26) | (0x3fffffc & newrel) | (insn & 0x3);
- write_inferior_memory (*to, (unsigned char *) &insn, 4);
+ target_write_memory (*to, (unsigned char *) &insn, 4);
*to += 4;
return;
@@ -1583,14 +1583,14 @@ ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
/* Build a unconditional branch and copy LK bit. */
insn = (18 << 26) | (0x3fffffc & newrel) | (insn & 0x3);
- write_inferior_memory (*to, (unsigned char *) &insn, 4);
+ target_write_memory (*to, (unsigned char *) &insn, 4);
*to += 4;
return;
}
}
- write_inferior_memory (*to, (unsigned char *) &insn, 4);
+ target_write_memory (*to, (unsigned char *) &insn, 4);
*to += 4;
}
@@ -1750,7 +1750,7 @@ ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
p += GEN_ADDI (p, 1, 1, frame_size);
/* Flush instructions to inferior memory. */
- write_inferior_memory (buildaddr, (unsigned char *) buf, (p - buf) * 4);
+ target_write_memory (buildaddr, (unsigned char *) buf, (p - buf) * 4);
/* Now, insert the original instruction to execute in the jump pad. */
*adjusted_insn_addr = buildaddr + (p - buf) * 4;
@@ -1780,7 +1780,7 @@ ppc_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr,
}
/* b <tpaddr+4> */
p += GEN_B (p, offset);
- write_inferior_memory (buildaddr, (unsigned char *) buf, (p - buf) * 4);
+ target_write_memory (buildaddr, (unsigned char *) buf, (p - buf) * 4);
*jump_entry = buildaddr + (p - buf) * 4;
/* The jump pad is now built. Wire in a jump to our jump pad. This
@@ -1816,7 +1816,7 @@ static void
emit_insns (uint32_t *buf, int n)
{
n = n * sizeof (uint32_t);
- write_inferior_memory (current_insn_ptr, (unsigned char *) buf, n);
+ target_write_memory (current_insn_ptr, (unsigned char *) buf, n);
current_insn_ptr += n;
}
@@ -2604,7 +2604,7 @@ ppc_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size)
}
if (!emit_error)
- write_inferior_memory (from, (unsigned char *) &insn, 4);
+ target_write_memory (from, (unsigned char *) &insn, 4);
}
/* Table of emit ops for 32-bit. */