public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/infcmd: remove the unused parameter 'args' in 'attach_post_wait'
@ 2021-04-22 15:22 Tankut Baris Aktemur
  0 siblings, 0 replies; only message in thread
From: Tankut Baris Aktemur @ 2021-04-22 15:22 UTC (permalink / raw)
  To: gdb-cvs

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

commit 27d0790a58e6606eb3404a8d10a9dcee82817987
Author: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Date:   Thu Apr 22 17:22:38 2021 +0200

    gdb/infcmd: remove the unused parameter 'args' in 'attach_post_wait'
    
    The 'arg' parameter of 'attach_post_wait' is unused.  Remove it.
    
    gdb/ChangeLog:
    2021-04-22  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
    
            * infcmd.c (attach_post_wait): Remove the unused parameter 'args'.
            Update the references below.
            (struct attach_command_continuation_args)
            (attach_command_continuation)
            (attach_command_continuation_free_args)
            (attach_command)
            (notice_new_inferior): Update to remove the reference to 'args'.

Diff:
---
 gdb/ChangeLog | 10 ++++++++++
 gdb/infcmd.c  | 12 ++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 953fe19753f..191b17177d2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2021-04-22  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
+
+	* infcmd.c (attach_post_wait): Remove the unused parameter 'args'.
+	Update the references below.
+	(struct attach_command_continuation_args)
+	(attach_command_continuation)
+	(attach_command_continuation_free_args)
+	(attach_command)
+	(notice_new_inferior): Update to remove the reference to 'args'.
+
 2021-04-22  Simon Marchi  <simon.marchi@polymtl.ca>
 	    Tom de Vries  <tdevries@suse.de>
 
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 60f25d24686..f89eb7beb03 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2471,7 +2471,7 @@ enum attach_post_wait_mode
    should be running.  Else if ATTACH, */
 
 static void
-attach_post_wait (const char *args, int from_tty, enum attach_post_wait_mode mode)
+attach_post_wait (int from_tty, enum attach_post_wait_mode mode)
 {
   struct inferior *inferior;
 
@@ -2542,7 +2542,6 @@ attach_post_wait (const char *args, int from_tty, enum attach_post_wait_mode mod
 
 struct attach_command_continuation_args
 {
-  char *args;
   int from_tty;
   enum attach_post_wait_mode mode;
 };
@@ -2556,7 +2555,7 @@ attach_command_continuation (void *args, int err)
   if (err)
     return;
 
-  attach_post_wait (a->args, a->from_tty, a->mode);
+  attach_post_wait (a->from_tty, a->mode);
 }
 
 static void
@@ -2565,7 +2564,6 @@ attach_command_continuation_free_args (void *args)
   struct attach_command_continuation_args *a
     = (struct attach_command_continuation_args *) args;
 
-  xfree (a->args);
   xfree (a);
 }
 
@@ -2677,7 +2675,6 @@ attach_command (const char *args, int from_tty)
 
       /* Wait for stop.  */
       a = XNEW (struct attach_command_continuation_args);
-      a->args = xstrdup (args);
       a->from_tty = from_tty;
       a->mode = mode;
       add_inferior_continuation (attach_command_continuation, a,
@@ -2692,7 +2689,7 @@ attach_command (const char *args, int from_tty)
       return;
     }
   else
-    attach_post_wait (args, from_tty, mode);
+    attach_post_wait (from_tty, mode);
 
   disable_commit_resumed.reset_and_commit ();
 }
@@ -2737,7 +2734,6 @@ notice_new_inferior (thread_info *thr, int leave_running, int from_tty)
 
       /* Wait for stop before proceeding.  */
       a = XNEW (struct attach_command_continuation_args);
-      a->args = xstrdup ("");
       a->from_tty = from_tty;
       a->mode = mode;
       add_inferior_continuation (attach_command_continuation, a,
@@ -2746,7 +2742,7 @@ notice_new_inferior (thread_info *thr, int leave_running, int from_tty)
       return;
     }
 
-  attach_post_wait ("" /* args */, from_tty, mode);
+  attach_post_wait (from_tty, mode);
 }
 
 /*


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-22 15:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 15:22 [binutils-gdb] gdb/infcmd: remove the unused parameter 'args' in 'attach_post_wait' Tankut Baris Aktemur

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).