[review] infcall: remove unused parameter in 'value_arg_coerce'

Message ID gerrit.1571406803000.If324a1dda3fa5d4c145790b92bd3f656c00296f4@gnutoolchain-gerrit.osci.io
State New, archived
Headers

Commit Message

Simon Marchi (Code Review) Oct. 18, 2019, 1:53 p.m. UTC
  Tankut Baris Aktemur has uploaded a new change for review.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/140
......................................................................

infcall: remove unused parameter in 'value_arg_coerce'

Remove the unused SP parameter from the auxiliary function
'value_arg_coerce'.

gdb/ChangeLog:
2019-MM-DD  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* infcall.c (value_arg_coerce): Remove an unused parameter.
	(call_function_by_hand_dummy): Update the call to
	'value_arg_coerce'.

Change-Id: If324a1dda3fa5d4c145790b92bd3f656c00296f4
---
M gdb/infcall.c
1 file changed, 3 insertions(+), 5 deletions(-)
  

Comments

Simon Marchi (Code Review) Oct. 18, 2019, 9 p.m. UTC | #1
Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/140
......................................................................


Patch Set 1: Code-Review+2

Thank you for the patch.  This is ok.
  
Simon Marchi (Code Review) Oct. 21, 2019, 7:53 a.m. UTC | #2
Tankut Baris Aktemur has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/140
......................................................................


Patch Set 1:

> Patch Set 1: Code-Review+2
> 
> Thank you for the patch.  This is ok.

Thank you.  This is a patch in a series, but it does not depend on other patches; so it can be applied first.  Is it OK to merge it without other patches receiving an OK?  Is there a concrete about this?

Also, I don't have write access to the repository.  Would you be able to apply this change, or may I be granted write access?
  
Simon Marchi (Code Review) Oct. 22, 2019, 12:46 p.m. UTC | #3
Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/140
......................................................................


Patch Set 2:

> Thank you.  This is a patch in a series, but it does not depend on other patches; so it can be applied first.  Is it OK to merge it without other patches receiving an OK?  Is there a concrete about this?

I think it depends on the patch.

My view of the rule is that if a patch is desirable for its own sake, then it
can go in immediately.  On the other hand, if a patch is only useful in
conjunction with some other patch, then it should wait.

> Also, I don't have write access to the repository.  Would you be able to apply this change, or may I be granted write access?

Please contact me off-list and we can get you set up with write-after-commit
access (assuming your copyright paperwork is in order).  The rule in gdb is that
you must have one approved patch to get access.
  

Patch

diff --git a/gdb/infcall.c b/gdb/infcall.c
index 629a83c..288b9e0 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -145,13 +145,11 @@ 
    for arguments to be passed to C, Ada or Fortran functions.
 
    If PARAM_TYPE is non-NULL, it is the expected parameter type.
-   IS_PROTOTYPED is non-zero if the function declaration is prototyped.
-   SP is the stack pointer were additional data can be pushed (updating
-   its value as needed).  */
+   IS_PROTOTYPED is non-zero if the function declaration is prototyped.  */
 
 static struct value *
 value_arg_coerce (struct gdbarch *gdbarch, struct value *arg,
-		  struct type *param_type, int is_prototyped, CORE_ADDR *sp)
+		  struct type *param_type, int is_prototyped)
 {
   const struct builtin_type *builtin = builtin_type (gdbarch);
   struct type *arg_type = check_typedef (value_type (arg));
@@ -1020,7 +1018,7 @@ 
 	param_type = NULL;
 
       args[i] = value_arg_coerce (gdbarch, args[i],
-				  param_type, prototyped, &sp);
+				  param_type, prototyped);
 
       if (param_type != NULL
 	  && !(language_pass_by_reference (param_type).trivially_copyable))