This is the mail archive of the gdb-patches@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]

[obv][commit] Eliminate a single-use variable in eval.c


Hi,

I have committed another small change that eliminates a local
variable that is used only once in the function with the direct function
call.  This is an attempt to make the changes for 64-bit struct offset
and length smaller.  For a context on those changes, please refer:

http://sourceware.org/ml/gdb-patches/2012-08/msg00144.html

Regards,
Siddhesh

http://sourceware.org/ml/gdb-cvs/2012-09/msg00117.html

Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14683
diff -u -r1.14683 ChangeLog
--- gdb/ChangeLog	21 Sep 2012 01:46:39 -0000	1.14683
+++ gdb/ChangeLog	21 Sep 2012 09:23:17 -0000
@@ -1,3 +1,8 @@
+2012-09-21  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* eval.c (evaluate_subexp_standard): Eliminate single-use
+	variable LOWER.
+
 2012-09-21  Yao Qi  <yao@codesourcery.com>
 
 	* mi/mi-interp.c: Declare mi_record_changed.
Index: gdb/eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.171
diff -u -r1.171 eval.c
--- gdb/eval.c	16 Aug 2012 07:36:19 -0000	1.171
+++ gdb/eval.c	21 Sep 2012 09:23:18 -0000
@@ -810,7 +810,6 @@
   struct type *type;
   int nargs;
   struct value **argvec;
-  int lower;
   int code;
   int ix;
   long mem_offset;
@@ -2370,8 +2369,8 @@
 	    struct type *array_type = check_typedef (value_type (array));
 	    LONGEST index = subscript_array[i - 1];
 
-	    lower = f77_get_lowerbound (array_type);
-	    array = value_subscripted_rvalue (array, index, lower);
+	    array = value_subscripted_rvalue (array, index,
+					      f77_get_lowerbound (array_type));
 	  }
 


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