]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Improve target.h & target_ops & xfer_partial descriptions
authorPedro Alves <pedro@palves.net>
Wed, 24 Apr 2024 12:53:00 +0000 (13:53 +0100)
committerPedro Alves <pedro@palves.net>
Fri, 26 Apr 2024 21:06:38 +0000 (22:06 +0100)
commitd9df7f165a2472f2be5235f5404cf239d1c31c3d
treeddf73b6da4868f1e32901384480eecefad95e8a3
parent5e86aab85118ae705bbf9b247497167a8d801d2c
Improve target.h & target_ops & xfer_partial descriptions

Working backwards in terms of motivation for the patch:

- When accessing memory via the xfer_partial interface, the process
  that we're accessing is indicated by inferior_ptid.  This can be
  either the same process as current inferior, or a fork child which
  does not exist in the inferior list.  This is not documented
  currently.  This commit fixes that.

- For target delegation to work, we must always make the inferior we
  want to call the target method on, the current inferior.  This
  wasn't documented, AFAICT, so this commit fixes that too.  I put
  that in the intro comment to target_ops.

- I actually started writing a larger intro comment to target_ops, as
  there was seemingly none, which I did find odd.  However, I then
  noticed the description closer to the top of the file.  I missed it
  the first time, because for some reason, that intro comment is no
  longer at the top of the file, as #includes etc. have been added
  above it over the years.  This commit fixes that too, by moving that
  intro comment to the top.

Change-Id: Id21f5462947f2a0f6f3ac0c42532df62ba355914
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/target.h