This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] remote: Small cleanup in compare_section_command


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e9a6b2f040e016c9dd7f9841a0272e488ed2fd5

commit 0e9a6b2f040e016c9dd7f9841a0272e488ed2fd5
Author: Pedro Alves <palves@redhat.com>
Date:   Tue May 22 18:22:09 2018 +0100

    remote: Small cleanup in compare_section_command
    
    The set_general_process call in compare_sections_command isn't
    actually needed.  remote_target::verify_memory and
    remote_target::xfer_partial already handle making sure the remote is
    pointing at the right process or thread.
    
    Getting this out of the way helps a bit with further elimination of
    the remote_state global, because we have to handle the case of a user
    invoking the command even if not connect to a remote target.
    
    gdb/ChangeLog:
    2018-05-22  Pedro Alves  <palves@redhat.com>
    
    	* remote.c (compare_section_command): Remove set_general_process
    	call.

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/remote.c  | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c17528f..205dd4d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
 2018-05-22  Pedro Alves  <palves@redhat.com>
 
+	* remote.c (compare_section_command): Remove set_general_process
+	call.
+
+2018-05-22  Pedro Alves  <palves@redhat.com>
+
 	* remote.c (struct packet_reg, struct remote_arch_state):
 	Move higher up in the file.
 	(remote_state) <m_arch_states>: Store remote_arch_state values
diff --git a/gdb/remote.c b/gdb/remote.c
index 1d1819b..fbf23b8 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10516,9 +10516,6 @@ compare_sections_command (const char *args, int from_tty)
   if (!exec_bfd)
     error (_("command cannot be used without an exec file"));
 
-  /* Make sure the remote is pointing at the right process.  */
-  set_general_process ();
-
   if (args != NULL && strcmp (args, "-r") == 0)
     {
       read_only = 1;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]