public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Extend "set cwd" to work on gdbserver Date: Wed, 04 Oct 2017 07:08:00 -0000 [thread overview] Message-ID: <bc3b087de2401c65c02730d346e8bea4dc0504ae@gdb-build> (raw) *** TEST RESULTS FOR COMMIT bc3b087de2401c65c02730d346e8bea4dc0504ae *** Author: Sergio Durigan Junior <sergiodj@redhat.com> Branch: master Commit: bc3b087de2401c65c02730d346e8bea4dc0504ae Extend "set cwd" to work on gdbserver This is the "natural" extension necessary for the "set cwd" command (and the whole "set the inferior's cwd" logic) to work on gdbserver. The idea here is to have a new remote packet, QSetWorkingDir (name adopted from LLDB's extension to the RSP, as can be seen at <https://raw.githubusercontent.com/llvm-mirror/lldb/master/docs/lldb-gdb-remote.txt>), which sends an hex-encoded string representing the working directory that the remote inferior will use. There is a slight difference from the packet proposed by LLDB: GDB's version will accept empty arguments, meaning that the user wants to clear the previously set working directory for the inferior (i.e., "set cwd" without arguments on GDB). For UNIX-like targets this feature is already implemented on nat/fork-inferior.c, and all gdbserver has to do is to basically implement "set_inferior_cwd" and call it whenever such packet arrives. For other targets, like Windows, it is possible to use the existing "get_inferior_cwd" function and do the necessary steps to make sure that the inferior will use the specified working directory. Aside from that, the patch consists basically of updates to the testcase (making it available on remote targets) and the documentation. No regressions found. gdb/ChangeLog: 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com> * NEWS (Changes since GDB 8.0): Add entry about new 'set-cwd-on-gdbserver' feature. (New remote packets): Add entry for QSetWorkingDir. * common/common-inferior.h (set_inferior_cwd): New prototype. * infcmd.c (set_inferior_cwd): Remove "static". (show_cwd_command): Expand text to include remote debugging. * remote.c: Add PACKET_QSetWorkingDir. (remote_protocol_features) <QSetWorkingDir>: New entry for PACKET_QSetWorkingDir. (extended_remote_set_inferior_cwd): New function. (extended_remote_create_inferior): Call "extended_remote_set_inferior_cwd". (_initialize_remote): Call "add_packet_config_cmd" for QSetWorkingDir. gdb/gdbserver/ChangeLog: 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com> * inferiors.c (set_inferior_cwd): New function. * server.c (handle_general_set): Handle QSetWorkingDir packet. (handle_query): Inform that QSetWorkingDir is supported. * win32-low.c (create_process): Pass the inferior's cwd to CreateProcess. gdb/testsuite/ChangeLog: 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.base/set-cwd.exp: Make it available on native-extended-gdbserver. gdb/doc/ChangeLog: 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.texinfo (Starting your Program) <The working directory.>: Mention remote debugging. (Working Directory) <Your Program's Working Directory>: Likewise. (Connecting) <Remote Packet>: Add "set-working-dir" and "QSetWorkingDir" to the table. (Remote Protocol) <QSetWorkingDir>: New item, explaining the packet.
next reply other threads:[~2017-10-04 7:08 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-10-04 7:08 sergiodj+buildbot [this message] 2017-10-04 7:08 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot 2017-10-04 9:09 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot 2017-10-04 9:12 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot 2017-10-04 9:15 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot 2017-10-04 9:28 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot 2017-10-04 9:29 ` Failures on Fedora-i686, " sergiodj+buildbot 2017-10-04 9:45 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot 2017-10-04 9:51 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot 2017-10-04 10:12 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot 2017-10-04 10:15 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot 2017-10-04 10:39 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot
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=bc3b087de2401c65c02730d346e8bea4dc0504ae@gdb-build \ --to=sergiodj+buildbot@sergiodj.net \ --cc=gdb-testers@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).