public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/linux-nat: add pid parameter to linux_proc_xfer_memory_partial Date: Fri, 2 Dec 2022 19:47:01 +0000 (GMT) [thread overview] Message-ID: <20221202194701.A3CA33858CDA@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f9f593ddb2dee399e1ad24370c8e627aa4262524 commit f9f593ddb2dee399e1ad24370c8e627aa4262524 Author: Simon Marchi <simon.marchi@polymtl.ca> Date: Fri Nov 25 16:27:15 2022 -0500 gdb/linux-nat: add pid parameter to linux_proc_xfer_memory_partial Add a pid parameter to linux_proc_xfer_memory_partial, making the inferior_ptid reference bubble up close to the target_ops::xfer_partial boundary. No behavior change expected. Change-Id: I58171b00ee1bba1ea22efdbb5dcab8b1ab3aac4c Diff: --- gdb/linux-nat.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 0b3c143382b..17e5dce08c3 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3667,8 +3667,9 @@ linux_nat_xfer_osdata (enum target_object object, ULONGEST *xfered_len); static enum target_xfer_status -linux_proc_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf, - ULONGEST offset, LONGEST len, ULONGEST *xfered_len); +linux_proc_xfer_memory_partial (int pid, gdb_byte *readbuf, + const gdb_byte *writebuf, ULONGEST offset, + LONGEST len, ULONGEST *xfered_len); enum target_xfer_status linux_nat_target::xfer_partial (enum target_object object, @@ -3713,8 +3714,9 @@ linux_nat_target::xfer_partial (enum target_object object, space, while the core was trying to write to the pre-exec address space. */ if (proc_mem_file_is_writable ()) - return linux_proc_xfer_memory_partial (readbuf, writebuf, - offset, len, xfered_len); + return linux_proc_xfer_memory_partial (inferior_ptid.pid (), readbuf, + writebuf, offset, len, + xfered_len); } return inf_ptrace_target::xfer_partial (object, annex, readbuf, writebuf, @@ -3941,12 +3943,10 @@ linux_proc_xfer_memory_partial_fd (int fd, int pid, threads. */ static enum target_xfer_status -linux_proc_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf, - ULONGEST offset, LONGEST len, - ULONGEST *xfered_len) +linux_proc_xfer_memory_partial (int pid, gdb_byte *readbuf, + const gdb_byte *writebuf, ULONGEST offset, + LONGEST len, ULONGEST *xfered_len) { - int pid = inferior_ptid.pid (); - auto iter = proc_mem_file_map.find (pid); if (iter == proc_mem_file_map.end ()) return TARGET_XFER_EOF;
reply other threads:[~2022-12-02 19:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221202194701.A3CA33858CDA@sourceware.org \ --to=simark@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).