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] Fix non-multi-arch default for INTEGER_TO_ADDRESS.


Er,

I just tweeked the attached.  Without it non-multi-arch targets get a 
really strange compiler warning in values.c.

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

	* gdbarch.sh (fallbackdefault): Set to one when predefault is
	empty.
	* gdbarch.h: Regenerate.

Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.61
diff -p -r1.61 gdbarch.h
*** gdbarch.h	2001/10/15 18:18:29	1.61
--- gdbarch.h	2001/10/15 21:36:35
*************** extern int gdbarch_integer_to_address_p 
*** 1261,1267 ****
  
  /* Default (function) for non- multi-arch platforms. */
  #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
! #define INTEGER_TO_ADDRESS(type, buf) ( (type, buf))
  #endif
  
  typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
--- 1261,1267 ----
  
  /* Default (function) for non- multi-arch platforms. */
  #if (!GDB_MULTI_ARCH) && !defined (INTEGER_TO_ADDRESS)
! #define INTEGER_TO_ADDRESS(type, buf) (internal_error (__FILE__, __LINE__, "INTEGER_TO_ADDRESS"), 0)
  #endif
  
  typedef CORE_ADDR (gdbarch_integer_to_address_ftype) (struct type *type, void *buf);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.81
diff -p -r1.81 gdbarch.sh
*** gdbarch.sh	2001/10/15 18:18:29	1.81
--- gdbarch.sh	2001/10/15 21:36:35
*************** EOF
*** 111,117 ****
  	    then
  		fallbackdefault="${predefault}"
  	    else
! 		fallbackdefault=""
  	    fi
  
  	    #NOT YET: See gdbarch.log for basic verification of
--- 111,117 ----
  	    then
  		fallbackdefault="${predefault}"
  	    else
! 		fallbackdefault="0"
  	    fi
  
  	    #NOT YET: See gdbarch.log for basic verification of

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