From 027d8f7848f30e5b075dc0c9d74107a1747de190 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 20 Oct 2022 10:52:48 +0100 Subject: [PATCH] gdbserver: add comments to read_inferior_memory function Just adding some comments to the gdbserver read_inferior_memory function. No actual code changes. --- gdbserver/target.cc | 2 ++ gdbserver/target.h | 3 +++ gdbserver/tracepoint.cc | 2 ++ 3 files changed, 7 insertions(+) diff --git a/gdbserver/target.cc b/gdbserver/target.cc index 24b8e216013..720a61d636a 100644 --- a/gdbserver/target.cc +++ b/gdbserver/target.cc @@ -79,6 +79,8 @@ set_desired_process () return proc != nullptr; } +/* See target.h. */ + int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) { diff --git a/gdbserver/target.h b/gdbserver/target.h index eea651c30b4..6d92f0f5cd8 100644 --- a/gdbserver/target.h +++ b/gdbserver/target.h @@ -700,6 +700,9 @@ target_thread_pending_child (thread_info *thread) return the_target->thread_pending_child (thread); } +/* Read LEN bytes from MEMADDR in the buffer MYADDR. Return 0 if the read + is successful, otherwise, return a non-zero error code. */ + int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len); /* Set GDBserver's current thread to the thread the client requested diff --git a/gdbserver/tracepoint.cc b/gdbserver/tracepoint.cc index fa4cd8abb5e..37a9a8c5b7c 100644 --- a/gdbserver/tracepoint.cc +++ b/gdbserver/tracepoint.cc @@ -344,6 +344,8 @@ tracepoint_look_up_symbols (void) GDBserver side. */ #ifdef IN_PROCESS_AGENT +/* See target.h. */ + int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) { -- 2.30.2