diff options
author | Pedro Alves <pedro@palves.net> | 2022-03-29 13:32:48 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2022-04-14 20:22:56 +0100 |
commit | 8e347faf8f1556a0f1afc33bd53099ec5f2f8efe (patch) | |
tree | 09232d21bd7f8460d6fc9f399c4891d7f5c609de /gdbserver/tracepoint.cc | |
parent | 421490af33bfbfe8a8429f0e43fb3e9f8727476e (diff) | |
download | gdb-8e347faf8f1556a0f1afc33bd53099ec5f2f8efe.zip gdb-8e347faf8f1556a0f1afc33bd53099ec5f2f8efe.tar.gz gdb-8e347faf8f1556a0f1afc33bd53099ec5f2f8efe.tar.bz2 |
gdbserver: Eliminate prepare_to_access_memory
Given:
- The prepare_to_access_memory machinery was added for non-stop mode.
- Only Linux supports non-stop.
- Linux no longer needs the prepare_to_access_memory machinery. In
fact, after the previous patch,
linux_process_target::prepare_to_access_memory became a nop.
Thus, prepare_to_access_memory can go away, simplifying core GDBserver
code.
Change-Id: I93ac8bfe66bd61c3d1c4a0e7d419335163120ecf
Diffstat (limited to 'gdbserver/tracepoint.cc')
-rw-r--r-- | gdbserver/tracepoint.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc index 5459dc3..18b2b0b 100644 --- a/gdbserver/tracepoint.cc +++ b/gdbserver/tracepoint.cc @@ -2784,21 +2784,10 @@ cmd_qtenable_disable (char *own_buf, int enable) if (tp->type == fast_tracepoint || tp->type == static_tracepoint) { - int ret; int offset = offsetof (struct tracepoint, enabled); CORE_ADDR obj_addr = tp->obj_addr_on_target + offset; - ret = prepare_to_access_memory (); - if (ret) - { - trace_debug ("Failed to temporarily stop inferior threads"); - write_enn (own_buf); - return; - } - - ret = write_inferior_int8 (obj_addr, enable); - done_accessing_memory (); - + int ret = write_inferior_int8 (obj_addr, enable); if (ret) { trace_debug ("Cannot write enabled flag into " |