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

[commit] Convert VALUE_OPTIMIZED_OUT


committed,
Andrew
2005-02-06  Andrew Cagney  <cagney@gnu.org>

	* value.h (VALUE_OPTIMIZED_OUT): Delete.
	(value_optimized_out, set_value_optimized_out): Declare.
	* value.c (set_value_optimized_out, value_optimized_out): Define.
	* valprint.c, findvar.c, dwarf2loc.c: Update.
	
Index: dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.18
diff -p -u -r1.18 dwarf2loc.c
--- dwarf2loc.c	9 Nov 2004 14:43:25 -0000	1.18
+++ dwarf2loc.c	7 Feb 2005 04:13:41 -0000
@@ -1,5 +1,7 @@
 /* DWARF 2 location expression support for GDB.
-   Copyright 2003 Free Software Foundation, Inc.
+
+   Copyright 2003, 2005 Free Software Foundation, Inc.
+
    Contributed by Daniel Jacobowitz, MontaVista Software, Inc.
 
    This file is part of GDB.
@@ -214,7 +216,7 @@ dwarf2_evaluate_loc_desc (struct symbol 
     {
       retval = allocate_value (SYMBOL_TYPE (var));
       VALUE_LVAL (retval) = not_lval;
-      VALUE_OPTIMIZED_OUT (retval) = 1;
+      set_value_optimized_out (retval, 1);
     }
 
   baton.frame = frame;
Index: findvar.c
===================================================================
RCS file: /cvs/src/src/gdb/findvar.c,v
retrieving revision 1.84
diff -p -u -r1.84 findvar.c
--- findvar.c	2 Feb 2005 22:34:34 -0000	1.84
+++ findvar.c	7 Feb 2005 04:13:41 -0000
@@ -287,7 +287,7 @@ value_of_register (int regnum, struct fr
   VALUE_LVAL (reg_val) = lval;
   VALUE_ADDRESS (reg_val) = addr;
   VALUE_REGNUM (reg_val) = regnum;
-  VALUE_OPTIMIZED_OUT (reg_val) = optim;
+  set_value_optimized_out (reg_val, optim);
   VALUE_FRAME_ID (reg_val) = get_frame_id (frame);
   return reg_val;
 }
@@ -576,7 +576,7 @@ addresses have not been bound by the dyn
 
     case LOC_OPTIMIZED_OUT:
       VALUE_LVAL (v) = not_lval;
-      VALUE_OPTIMIZED_OUT (v) = 1;
+      set_value_optimized_out (v, 1);
       return v;
 
     default:
@@ -701,7 +701,7 @@ value_from_register (struct type *type, 
 	  VALUE_REGNUM (v) = regnum;
 	}
       
-      VALUE_OPTIMIZED_OUT (v) = optimized;
+      set_value_optimized_out (v, optimized);
       
       /* Any structure stored in more than one register will always be
          an integral number of registers.  Otherwise, you need to do
Index: valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/valprint.c,v
retrieving revision 1.40
diff -p -u -r1.40 valprint.c
--- valprint.c	29 Jan 2005 01:59:31 -0000	1.40
+++ valprint.c	7 Feb 2005 04:13:42 -0000
@@ -164,7 +164,7 @@ value_print (struct value *val, struct u
       printf_filtered ("<address of value unknown>");
       return 0;
     }
-  if (VALUE_OPTIMIZED_OUT (val))
+  if (value_optimized_out (val))
     {
       printf_filtered ("<value optimized out>");
       return 0;
Index: value.c
===================================================================
RCS file: /cvs/src/src/gdb/value.c,v
retrieving revision 1.12
diff -p -u -r1.12 value.c
--- value.c	7 Feb 2005 00:09:55 -0000	1.12
+++ value.c	7 Feb 2005 04:13:42 -0000
@@ -96,7 +96,7 @@ allocate_value (struct type *type)
   val->bitsize = 0;
   VALUE_REGNUM (val) = -1;
   val->lazy = 0;
-  VALUE_OPTIMIZED_OUT (val) = 0;
+  val->optimized_out = 0;
   VALUE_EMBEDDED_OFFSET (val) = 0;
   VALUE_POINTED_TO_OFFSET (val) = 0;
   val->modifiable = 1;
@@ -193,6 +193,17 @@ value_contents_writeable (struct value *
   return value->aligner.contents;
 }
 
+int
+value_optimized_out (struct value *value)
+{
+  return value->optimized_out;
+}
+
+void
+set_value_optimized_out (struct value *value, int val)
+{
+  value->optimized_out = val;
+}
 
 /* Return a mark in the value chain.  All values allocated after the
    mark is obtained (except for those released) are subject to being freed
@@ -297,7 +308,7 @@ value_copy (struct value *arg)
   VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
   VALUE_REGNUM (val) = VALUE_REGNUM (arg);
   val->lazy = arg->lazy;
-  VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg);
+  val->optimized_out = arg->optimized_out;
   VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (arg);
   VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (arg);
   val->modifiable = arg->modifiable;
Index: value.h
===================================================================
RCS file: /cvs/src/src/gdb/value.h,v
retrieving revision 1.70
diff -p -u -r1.70 value.h
--- value.h	7 Feb 2005 00:09:55 -0000	1.70
+++ value.h	7 Feb 2005 04:13:42 -0000
@@ -213,7 +213,8 @@ extern int value_fetch_lazy (struct valu
 #define VALUE_INTERNALVAR(val) (val)->location.internalvar
 #define VALUE_FRAME_ID(val) ((val)->frame_id)
 #define VALUE_REGNUM(val) (val)->regnum
-#define VALUE_OPTIMIZED_OUT(val) ((val)->optimized_out)
+extern int value_optimized_out (struct value *value);
+extern void set_value_optimized_out (struct value *value, int val);
 #define VALUE_EMBEDDED_OFFSET(val) ((val)->embedded_offset)
 #define VALUE_POINTED_TO_OFFSET(val) ((val)->pointed_to_offset)
 

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