remote: Small cleanup in compare_section_command
authorPedro Alves <palves@redhat.com>
Tue, 22 May 2018 17:22:09 +0000 (18:22 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 22 May 2018 17:33:21 +0000 (18:33 +0100)
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.

gdb/ChangeLog
gdb/remote.c

index c17528ff4c351063911221ab5a3379df7c769108..205dd4d388b7b921cd60c43e6a44749bc62fe36c 100644 (file)
@@ -1,3 +1,8 @@
+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):
index 1d1819bac17b1ad828fd86ae266c182c84e1d986..fbf23b8a4378b8e5c3eac3f0239574fffceed70f 100644 (file)
@@ -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;
This page took 0.033458 seconds and 4 git commands to generate.