Implement remote_pid_to_exec_file using qXfer:exec-file:read
authorGary Benson <gbenson@redhat.com>
Fri, 17 Apr 2015 08:47:30 +0000 (09:47 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 17 Apr 2015 08:47:30 +0000 (09:47 +0100)
commitc78fa86a213db1bdef328437ac262a4f54577827
tree26a80a1ed4af857d16cc3955977f02c9ad350cae
parente0d86d2cbd168e083f3d077b8cfe67c3d03c1e5f
Implement remote_pid_to_exec_file using qXfer:exec-file:read

This commit adds a new packet "qXfer:exec-file:read" to the remote
protocol that can be used to obtain the pathname of the file that
was executed to create a process on the remote system.  Support for
this packet is added to GDB and remote_ops.to_pid_to_exec_file is
implemented using it.

gdb/ChangeLog:

* target.h (TARGET_OBJECT_EXEC_FILE): New enum value.
* remote.c (PACKET_qXfer_exec_file): Likewise.
(remote_protocol_features): Register the
"qXfer:exec-file:read" feature.
(remote_xfer_partial): Handle TARGET_OBJECT_EXEC_FILE.
(remote_pid_to_exec_file): New function.
(init_remote_ops): Initialize to_pid_to_exec_file.
(_initialize_remote): Register new "set/show remote
pid-to-exec-file-packet" command.
* NEWS: Announce new qXfer:exec-file:read packet.

gdb/doc/ChangeLog:

* gdb.texinfo (Remote Configuration): Document the "set/show
remote pid-to-exec-file-packet" command.
(General Query Packets): Document the qXfer:exec-file:read
qSupported features.  Document the qXfer:exec-file:read packet.
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/remote.c
gdb/target.h