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]

[patch] s/value_ptr/struct value */ for *lang.c and *print.c


Enjoy,

Andrew
2001-11-10  Andrew Cagney  <ac131313@redhat.com>

	* c-valprint.c, ch-lang.c, ch-valprint.c, cp-valprint.c,
	p-valprint.c, scm-exp.c, scm-lang.c, scm-valprint.c: Replace
	value_ptr with struct value.
	
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.10
diff -p -r1.10 c-valprint.c
*** c-valprint.c	2001/09/05 23:07:08	1.10
--- c-valprint.c	2001/11/10 20:40:49
***************
*** 1,6 ****
  /* Support for printing C values for GDB, the GNU debugger.
     Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
!    1998, 1999, 2000
     Free Software Foundation, Inc.
  
     This file is part of GDB.
--- 1,6 ----
  /* Support for printing C values for GDB, the GNU debugger.
     Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
!    1998, 1999, 2000, 2001
     Free Software Foundation, Inc.
  
     This file is part of GDB.
*************** c_val_print (struct type *type, char *va
*** 209,215 ****
  		}
  	      if (vt_address && vtblprint)
  		{
! 		  value_ptr vt_val;
  		  struct symbol *wsym = (struct symbol *) NULL;
  		  struct type *wtype;
  		  struct symtab *s;
--- 209,215 ----
  		}
  	      if (vt_address && vtblprint)
  		{
! 		  struct value *vt_val;
  		  struct symbol *wsym = (struct symbol *) NULL;
  		  struct type *wtype;
  		  struct symtab *s;
*************** c_val_print (struct type *type, char *va
*** 274,280 ****
  	{
  	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
  	    {
! 	      value_ptr deref_val =
  	      value_at
  	      (TYPE_TARGET_TYPE (type),
  	       unpack_pointer (lookup_pointer_type (builtin_type_void),
--- 274,280 ----
  	{
  	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
  	    {
! 	      struct value *deref_val =
  	      value_at
  	      (TYPE_TARGET_TYPE (type),
  	       unpack_pointer (lookup_pointer_type (builtin_type_void),
*************** c_val_print (struct type *type, char *va
*** 467,473 ****
  }
  
  int
! c_value_print (value_ptr val, struct ui_file *stream, int format,
  	       enum val_prettyprint pretty)
  {
    struct type *type = VALUE_TYPE (val);
--- 467,473 ----
  }
  
  int
! c_value_print (struct value *val, struct ui_file *stream, int format,
  	       enum val_prettyprint pretty)
  {
    struct type *type = VALUE_TYPE (val);
*************** c_value_print (value_ptr val, struct ui_
*** 500,506 ****
  	      /* Copy value, change to pointer, so we don't get an
  	       * error about a non-pointer type in value_rtti_target_type
  	       */
! 	      value_ptr temparg;
  	      temparg=value_copy(val);
  	      VALUE_TYPE (temparg) = lookup_pointer_type(TYPE_TARGET_TYPE(type));
  	      val=temparg;
--- 500,506 ----
  	      /* Copy value, change to pointer, so we don't get an
  	       * error about a non-pointer type in value_rtti_target_type
  	       */
! 	      struct value *temparg;
  	      temparg=value_copy(val);
  	      VALUE_TYPE (temparg) = lookup_pointer_type(TYPE_TARGET_TYPE(type));
  	      val=temparg;
Index: ch-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ch-lang.c,v
retrieving revision 1.6
diff -p -r1.6 ch-lang.c
*** ch-lang.c	2001/03/06 08:21:06	1.6
--- ch-lang.c	2001/11/10 20:40:49
***************
*** 1,5 ****
  /* Chill language support routines for GDB, the GNU debugger.
!    Copyright 1992, 1993, 1994, 1995, 1996, 2000
     Free Software Foundation, Inc.
  
     This file is part of GDB.
--- 1,5 ----
  /* Chill language support routines for GDB, the GNU debugger.
!    Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001
     Free Software Foundation, Inc.
  
     This file is part of GDB.
***************
*** 31,45 ****
  
  extern void _initialize_chill_language (void);
  
! static value_ptr
! evaluate_subexp_chill (struct type *, struct expression *, int *,
! 		       enum noside);
  
! static value_ptr value_chill_max_min (enum exp_opcode, value_ptr);
  
! static value_ptr value_chill_card (value_ptr);
  
! static value_ptr value_chill_length (value_ptr);
  
  static struct type *chill_create_fundamental_type (struct objfile *, int);
  
--- 31,44 ----
  
  extern void _initialize_chill_language (void);
  
! static struct value *evaluate_subexp_chill (struct type *, struct expression *,
! 					    int *, enum noside);
  
! static struct value *value_chill_max_min (enum exp_opcode, struct value *);
  
! static struct value *value_chill_card (struct value *);
  
! static struct value *value_chill_length (struct value *);
  
  static struct type *chill_create_fundamental_type (struct objfile *, int);
  
*************** type_lower_upper (enum exp_opcode op,	/*
*** 389,396 ****
    error ("unknown mode for LOWER/UPPER builtin");
  }
  
! static value_ptr
! value_chill_length (value_ptr val)
  {
    LONGEST tmp;
    struct type *type = VALUE_TYPE (val);
--- 388,395 ----
    error ("unknown mode for LOWER/UPPER builtin");
  }
  
! static struct value *
! value_chill_length (struct value *val)
  {
    LONGEST tmp;
    struct type *type = VALUE_TYPE (val);
*************** value_chill_length (value_ptr val)
*** 417,424 ****
    return value_from_longest (builtin_type_int, tmp);
  }
  
! static value_ptr
! value_chill_card (value_ptr val)
  {
    LONGEST tmp = 0;
    struct type *type = VALUE_TYPE (val);
--- 416,423 ----
    return value_from_longest (builtin_type_int, tmp);
  }
  
! static struct value *
! value_chill_card (struct value *val)
  {
    LONGEST tmp = 0;
    struct type *type = VALUE_TYPE (val);
*************** value_chill_card (value_ptr val)
*** 441,448 ****
    return value_from_longest (builtin_type_int, tmp);
  }
  
! static value_ptr
! value_chill_max_min (enum exp_opcode op, value_ptr val)
  {
    LONGEST tmp = 0;
    struct type *type = VALUE_TYPE (val);
--- 440,447 ----
    return value_from_longest (builtin_type_int, tmp);
  }
  
! static struct value *
! value_chill_max_min (enum exp_opcode op, struct value *val)
  {
    LONGEST tmp = 0;
    struct type *type = VALUE_TYPE (val);
*************** value_chill_max_min (enum exp_opcode op,
*** 494,500 ****
  			     tmp);
  }
  
! static value_ptr
  evaluate_subexp_chill (struct type *expect_type,
  		       register struct expression *exp, register int *pos,
  		       enum noside noside)
--- 493,499 ----
  			     tmp);
  }
  
! static struct value *
  evaluate_subexp_chill (struct type *expect_type,
  		       register struct expression *exp, register int *pos,
  		       enum noside noside)
*************** evaluate_subexp_chill (struct type *expe
*** 502,509 ****
    int pc = *pos;
    struct type *type;
    int tem, nargs;
!   value_ptr arg1;
!   value_ptr *argvec;
    enum exp_opcode op = exp->elts[*pos].opcode;
    switch (op)
      {
--- 501,508 ----
    int pc = *pos;
    struct type *type;
    int tem, nargs;
!   struct value *arg1;
!   struct value **argvec;
    enum exp_opcode op = exp->elts[*pos].opcode;
    switch (op)
      {
*************** evaluate_subexp_chill (struct type *expe
*** 518,524 ****
        if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
  	{
  	  /* Looks like string repetition. */
! 	  value_ptr string = evaluate_subexp_with_coercion (exp, pos, noside);
  	  return value_concat (arg1, string);
  	}
  
--- 517,524 ----
        if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
  	{
  	  /* Looks like string repetition. */
! 	  struct value *string = evaluate_subexp_with_coercion (exp, pos,
! 								noside);
  	  return value_concat (arg1, string);
  	}
  
*************** evaluate_subexp_chill (struct type *expe
*** 556,562 ****
  
        while (nargs-- > 0)
  	{
! 	  value_ptr index = evaluate_subexp_with_coercion (exp, pos, noside);
  	  arg1 = value_subscript (arg1, index);
  	}
        return (arg1);
--- 556,563 ----
  
        while (nargs-- > 0)
  	{
! 	  struct value *index = evaluate_subexp_with_coercion (exp, pos,
! 							       noside);
  	  arg1 = value_subscript (arg1, index);
  	}
        return (arg1);
Index: ch-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/ch-valprint.c,v
retrieving revision 1.3
diff -p -r1.3 ch-valprint.c
*** ch-valprint.c	2001/03/06 08:21:06	1.3
--- ch-valprint.c	2001/11/10 20:40:50
***************
*** 1,6 ****
  /* Support for printing Chill values for GDB, the GNU debugger.
     Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
!    1998, 2000
     Free Software Foundation, Inc.
  
     This file is part of GDB.
--- 1,6 ----
  /* Support for printing Chill values for GDB, the GNU debugger.
     Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
!    1998, 2000, 2001
     Free Software Foundation, Inc.
  
     This file is part of GDB.
*************** chill_val_print (struct type *type, char
*** 445,451 ****
  	{
  	  if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
  	    {
! 	      value_ptr deref_val =
  	      value_at
  	      (TYPE_TARGET_TYPE (type),
  	       unpack_pointer (lookup_pointer_type (builtin_type_void),
--- 445,451 ----
  	{
  	  if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
  	    {
! 	      struct value *deref_val =
  	      value_at
  	      (TYPE_TARGET_TYPE (type),
  	       unpack_pointer (lookup_pointer_type (builtin_type_void),
*************** chill_print_value_fields (struct type *t
*** 537,543 ****
  	  fputs_filtered (": ", stream);
  	  if (TYPE_FIELD_PACKED (type, i))
  	    {
! 	      value_ptr v;
  
  	      /* Bitfields require special handling, especially due to byte
  	         order problems.  */
--- 537,543 ----
  	  fputs_filtered (": ", stream);
  	  if (TYPE_FIELD_PACKED (type, i))
  	    {
! 	      struct value *v;
  
  	      /* Bitfields require special handling, especially due to byte
  	         order problems.  */
*************** chill_print_value_fields (struct type *t
*** 564,570 ****
  }
  
  int
! chill_value_print (value_ptr val, struct ui_file *stream, int format,
  		   enum val_prettyprint pretty)
  {
    struct type *type = VALUE_TYPE (val);
--- 564,570 ----
  }
  
  int
! chill_value_print (struct value *val, struct ui_file *stream, int format,
  		   enum val_prettyprint pretty)
  {
    struct type *type = VALUE_TYPE (val);
Index: cp-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-valprint.c,v
retrieving revision 1.8
diff -p -r1.8 cp-valprint.c
*** cp-valprint.c	2001/03/22 00:58:00	1.8
--- cp-valprint.c	2001/11/10 20:40:50
***************
*** 1,6 ****
  /* Support for printing C++ values for GDB, the GNU debugger.
     Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
!    2000
     Free Software Foundation, Inc.
  
     This file is part of GDB.
--- 1,6 ----
  /* Support for printing C++ values for GDB, the GNU debugger.
     Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
!    2000, 2001
     Free Software Foundation, Inc.
  
     This file is part of GDB.
*************** static struct obstack dont_print_statmem
*** 48,54 ****
  
  extern void _initialize_cp_valprint (void);
  
! static void cp_print_static_field (struct type *, value_ptr,
  				   struct ui_file *, int, int,
  				   enum val_prettyprint);
  
--- 48,54 ----
  
  extern void _initialize_cp_valprint (void);
  
! static void cp_print_static_field (struct type *, struct value *,
  				   struct ui_file *, int, int,
  				   enum val_prettyprint);
  
*************** static void cp_print_value (struct type 
*** 57,63 ****
  			    enum val_prettyprint, struct type **);
  
  static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
! 						  value_ptr,
  						  struct ui_file *, int,
  						  int,
  						  enum val_prettyprint);
--- 57,63 ----
  			    enum val_prettyprint, struct type **);
  
  static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
! 						  struct value *,
  						  struct ui_file *, int,
  						  int,
  						  enum val_prettyprint);
*************** cp_print_value_fields (struct type *type
*** 348,354 ****
  
  	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
  	    {
! 	      value_ptr v;
  
  	      /* Bitfields require special handling, especially due to byte
  	         order problems.  */
--- 348,354 ----
  
  	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
  	    {
! 	      struct value *v;
  
  	      /* Bitfields require special handling, especially due to byte
  	         order problems.  */
*************** cp_print_value_fields (struct type *type
*** 374,380 ****
  		}
  	      else if (TYPE_FIELD_STATIC (type, i))
  		{
! 		  value_ptr v = value_static_field (type, i);
  		  if (v == NULL)
  		    fputs_filtered ("<optimized out>", stream);
  		  else
--- 374,380 ----
  		}
  	      else if (TYPE_FIELD_STATIC (type, i))
  		{
! 		  struct value *v = value_static_field (type, i);
  		  if (v == NULL)
  		    fputs_filtered ("<optimized out>", stream);
  		  else
*************** cp_print_value_fields (struct type *type
*** 413,419 ****
  		 hpacc_vtbl_ptr_name, 
  		 5))
      {
!       value_ptr v;
        /* First get the virtual table pointer and print it out */
  
  #if 0
--- 413,419 ----
  		 hpacc_vtbl_ptr_name, 
  		 5))
      {
!       struct value *v;
        /* First get the virtual table pointer and print it out */
  
  #if 0
*************** cp_print_value (struct type *type, struc
*** 627,633 ****
  
  static void
  cp_print_static_field (struct type *type,
! 		       value_ptr val,
  		       struct ui_file *stream,
  		       int format,
  		       int recurse,
--- 627,633 ----
  
  static void
  cp_print_static_field (struct type *type,
! 		       struct value *val,
  		       struct ui_file *stream,
  		       int format,
  		       int recurse,
*************** cp_print_class_member (char *valaddr, st
*** 745,751 ****
  
  static void
  cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
! 				      value_ptr v, struct ui_file *stream,
  				      int format, int recurse,
  				      enum val_prettyprint pretty)
  {
--- 745,751 ----
  
  static void
  cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
! 				      struct value *v, struct ui_file *stream,
  				      int format, int recurse,
  				      enum val_prettyprint pretty)
  {
*************** cp_print_hpacc_virtual_table_entries (st
*** 774,780 ****
  		    - 1);
  
  	  /* Get the address of the vfunction entry */
! 	  value_ptr vf = value_copy (v);
  	  if (VALUE_LAZY (vf))
  	    (void) value_fetch_lazy (vf);
  	  /* adjust by offset */
--- 774,780 ----
  		    - 1);
  
  	  /* Get the address of the vfunction entry */
! 	  struct value *vf = value_copy (v);
  	  if (VALUE_LAZY (vf))
  	    (void) value_fetch_lazy (vf);
  	  /* adjust by offset */
Index: p-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-valprint.c,v
retrieving revision 1.5
diff -p -r1.5 p-valprint.c
*** p-valprint.c	2001/11/09 09:48:09	1.5
--- p-valprint.c	2001/11/10 20:40:51
***************
*** 1,5 ****
  /* Support for printing Pascal values for GDB, the GNU debugger.
!    Copyright 2000
     Free Software Foundation, Inc.
  
     This file is part of GDB.
--- 1,5 ----
  /* Support for printing Pascal values for GDB, the GNU debugger.
!    Copyright 2000, 2001
     Free Software Foundation, Inc.
  
     This file is part of GDB.
*************** pascal_val_print (struct type *type, cha
*** 217,223 ****
  		}
  	      if (vt_address && vtblprint)
  		{
! 		  value_ptr vt_val;
  		  struct symbol *wsym = (struct symbol *) NULL;
  		  struct type *wtype;
  		  struct symtab *s;
--- 217,223 ----
  		}
  	      if (vt_address && vtblprint)
  		{
! 		  struct value *vt_val;
  		  struct symbol *wsym = (struct symbol *) NULL;
  		  struct type *wtype;
  		  struct symtab *s;
*************** pascal_val_print (struct type *type, cha
*** 282,288 ****
  	{
  	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
  	    {
! 	      value_ptr deref_val =
  	      value_at
  	      (TYPE_TARGET_TYPE (type),
  	       unpack_pointer (lookup_pointer_type (builtin_type_void),
--- 282,288 ----
  	{
  	  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
  	    {
! 	      struct value *deref_val =
  	      value_at
  	      (TYPE_TARGET_TYPE (type),
  	       unpack_pointer (lookup_pointer_type (builtin_type_void),
*************** pascal_val_print (struct type *type, cha
*** 531,537 ****
  }
  
  int
! pascal_value_print (value_ptr val, struct ui_file *stream, int format,
  		    enum val_prettyprint pretty)
  {
    struct type *type = VALUE_TYPE (val);
--- 531,537 ----
  }
  
  int
! pascal_value_print (struct value *val, struct ui_file *stream, int format,
  		    enum val_prettyprint pretty)
  {
    struct type *type = VALUE_TYPE (val);
*************** static int pascal_static_field_print;	/*
*** 579,587 ****
  static struct obstack dont_print_vb_obstack;
  static struct obstack dont_print_statmem_obstack;
  
! static void
!   pascal_object_print_static_field (struct type *, value_ptr, struct ui_file *, int, int,
! 				    enum val_prettyprint);
  
  static void
    pascal_object_print_value (struct type *, char *, CORE_ADDR, struct ui_file *,
--- 579,587 ----
  static struct obstack dont_print_vb_obstack;
  static struct obstack dont_print_statmem_obstack;
  
! static void pascal_object_print_static_field (struct type *, struct value *,
! 					      struct ui_file *, int, int,
! 					      enum val_prettyprint);
  
  static void
    pascal_object_print_value (struct type *, char *, CORE_ADDR, struct ui_file *,
*************** pascal_object_print_value_fields (struct
*** 834,840 ****
  
  	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
  	    {
! 	      value_ptr v;
  
  	      /* Bitfields require special handling, especially due to byte
  	         order problems.  */
--- 834,840 ----
  
  	  if (!TYPE_FIELD_STATIC (type, i) && TYPE_FIELD_PACKED (type, i))
  	    {
! 	      struct value *v;
  
  	      /* Bitfields require special handling, especially due to byte
  	         order problems.  */
*************** pascal_object_print_value_fields (struct
*** 859,866 ****
  		}
  	      else if (TYPE_FIELD_STATIC (type, i))
  		{
! 		  /* value_ptr v = value_static_field (type, i); v4.17 specific */
! 		  value_ptr v;
  		  v = value_from_longest (TYPE_FIELD_TYPE (type, i),
  				   unpack_field_as_long (type, valaddr, i));
  
--- 859,866 ----
  		}
  	      else if (TYPE_FIELD_STATIC (type, i))
  		{
! 		  /* struct value *v = value_static_field (type, i); v4.17 specific */
! 		  struct value *v;
  		  v = value_from_longest (TYPE_FIELD_TYPE (type, i),
  				   unpack_field_as_long (type, valaddr, i));
  
*************** pascal_object_print_value (struct type *
*** 1011,1017 ****
     have the same meanings as in c_val_print.  */
  
  static void
! pascal_object_print_static_field (struct type *type, value_ptr val,
  				  struct ui_file *stream, int format,
  				  int recurse, enum val_prettyprint pretty)
  {
--- 1011,1017 ----
     have the same meanings as in c_val_print.  */
  
  static void
! pascal_object_print_static_field (struct type *type, struct value *val,
  				  struct ui_file *stream, int format,
  				  int recurse, enum val_prettyprint pretty)
  {
Index: scm-exp.c
===================================================================
RCS file: /cvs/src/src/gdb/scm-exp.c,v
retrieving revision 1.4
diff -p -r1.4 scm-exp.c
*** scm-exp.c	2001/03/06 08:21:16	1.4
--- scm-exp.c	2001/11/10 20:40:51
*************** tryagain:
*** 308,314 ****
        scm_lreadr (skipping);
        if (!skipping)
  	{
! 	  value_ptr val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
  	  if (!is_scmvalue_type (VALUE_TYPE (val)))
  	    error ("quoted scm form yields non-SCM value");
  	  svalue = extract_signed_integer (VALUE_CONTENTS (val),
--- 308,314 ----
        scm_lreadr (skipping);
        if (!skipping)
  	{
! 	  struct value *val = scm_evaluate_string (str.ptr, lexptr - str.ptr);
  	  if (!is_scmvalue_type (VALUE_TYPE (val)))
  	    error ("quoted scm form yields non-SCM value");
  	  svalue = extract_signed_integer (VALUE_CONTENTS (val),
Index: scm-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/scm-lang.c,v
retrieving revision 1.5
diff -p -r1.5 scm-lang.c
*** scm-lang.c	2001/03/06 08:21:16	1.5
--- scm-lang.c	2001/11/10 20:40:52
***************
*** 1,5 ****
  /* Scheme/Guile language support routines for GDB, the GNU debugger.
!    Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
  
     This file is part of GDB.
  
--- 1,6 ----
  /* Scheme/Guile language support routines for GDB, the GNU debugger.
!    Copyright 1995, 1996, 1998, 2000, 2001
!    Free Software Foundation, Inc.
  
     This file is part of GDB.
  
***************
*** 32,40 ****
  #include "gdbcore.h"
  
  extern void _initialize_scheme_language (void);
! static value_ptr evaluate_subexp_scm (struct type *, struct expression *,
  				      int *, enum noside);
! static value_ptr scm_lookup_name (char *);
  static int in_eval_c (void);
  static void scm_printstr (struct ui_file * stream, char *string,
  			  unsigned int length, int width,
--- 33,41 ----
  #include "gdbcore.h"
  
  extern void _initialize_scheme_language (void);
! static struct value *evaluate_subexp_scm (struct type *, struct expression *,
  				      int *, enum noside);
! static struct value *scm_lookup_name (char *);
  static int in_eval_c (void);
  static void scm_printstr (struct ui_file * stream, char *string,
  			  unsigned int length, int width,
*************** in_eval_c (void)
*** 146,157 ****
     First lookup in Scheme context (using the scm_lookup_cstr inferior
     function), then try lookup_symbol for compiled variables. */
  
! static value_ptr
  scm_lookup_name (char *str)
  {
    value_ptr args[3];
    int len = strlen (str);
!   value_ptr func, val;
    struct symbol *sym;
    args[0] = value_allocate_space_in_inferior (len);
    args[1] = value_from_longest (builtin_type_int, len);
--- 147,159 ----
     First lookup in Scheme context (using the scm_lookup_cstr inferior
     function), then try lookup_symbol for compiled variables. */
  
! static struct value *
  scm_lookup_name (char *str)
  {
    value_ptr args[3];
    int len = strlen (str);
!   struct value *func;
!   struct value *val;
    struct symbol *sym;
    args[0] = value_allocate_space_in_inferior (len);
    args[1] = value_from_longest (builtin_type_int, len);
*************** scm_lookup_name (char *str)
*** 181,191 ****
    error ("No symbol \"%s\" in current context.");
  }
  
! value_ptr
  scm_evaluate_string (char *str, int len)
  {
!   value_ptr func;
!   value_ptr addr = value_allocate_space_in_inferior (len + 1);
    LONGEST iaddr = value_as_long (addr);
    write_memory (iaddr, str, len);
    /* FIXME - should find and pass env */
--- 183,193 ----
    error ("No symbol \"%s\" in current context.");
  }
  
! struct value *
  scm_evaluate_string (char *str, int len)
  {
!   struct value *func;
!   struct value *addr = value_allocate_space_in_inferior (len + 1);
    LONGEST iaddr = value_as_long (addr);
    write_memory (iaddr, str, len);
    /* FIXME - should find and pass env */
*************** scm_evaluate_string (char *str, int len)
*** 194,200 ****
    return call_function_by_hand (func, 1, &addr);
  }
  
! static value_ptr
  evaluate_subexp_scm (struct type *expect_type, register struct expression *exp,
  		     register int *pos, enum noside noside)
  {
--- 196,202 ----
    return call_function_by_hand (func, 1, &addr);
  }
  
! static struct value *
  evaluate_subexp_scm (struct type *expect_type, register struct expression *exp,
  		     register int *pos, enum noside noside)
  {
Index: scm-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/scm-valprint.c,v
retrieving revision 1.3
diff -p -r1.3 scm-valprint.c
*** scm-valprint.c	2001/03/06 08:21:16	1.3
--- scm-valprint.c	2001/11/10 20:40:52
***************
*** 1,5 ****
  /* Scheme/Guile language support routines for GDB, the GNU debugger.
!    Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
  
     This file is part of GDB.
  
--- 1,6 ----
  /* Scheme/Guile language support routines for GDB, the GNU debugger.
!    Copyright 1995, 1996, 1998, 1999, 2000, 2001
!    Free Software Foundation, Inc.
  
     This file is part of GDB.
  
*************** scm_val_print (struct type *type, char *
*** 386,392 ****
  }
  
  int
! scm_value_print (value_ptr val, struct ui_file *stream, int format,
  		 enum val_prettyprint pretty)
  {
    return (val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
--- 387,393 ----
  }
  
  int
! scm_value_print (struct value *val, struct ui_file *stream, int format,
  		 enum val_prettyprint pretty)
  {
    return (val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,

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