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]

[PATCH] upgrade arm_extract_struct_return to use new method.


2002-09-05  Michael Snyder  <msnyder@redhat.com>

	* arm-tdep.c (arm_extract_return_value): Use new regcache method.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.71
diff -p -r1.71 arm-tdep.c
*** arm-tdep.c	5 Sep 2002 19:03:07 -0000	1.71
--- arm-tdep.c	5 Sep 2002 19:04:47 -0000
*************** arm_extract_return_value (struct type *t
*** 2283,2291 ****
     the address in which a function should return its structure value.  */
  
  static CORE_ADDR
! arm_extract_struct_value_address (char *regbuf)
  {
!   return extract_address (regbuf, REGISTER_RAW_SIZE(ARM_A1_REGNUM));
  }
  
  /* Will a function return an aggregate type in memory or in a
--- 2283,2294 ----
     the address in which a function should return its structure value.  */
  
  static CORE_ADDR
! arm_extract_struct_value_address (struct regcache *regcache)
  {
!   ULONGEST ret;
! 
!   regcache_cooked_read_unsigned (regcache, ARM_A1_REGNUM, &ret);
!   return ret;
  }
  
  /* Will a function return an aggregate type in memory or in a
*************** arm_gdbarch_init (struct gdbarch_info in
*** 2933,2939 ****
    set_gdbarch_deprecated_store_return_value (gdbarch, arm_store_return_value);
    set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return);
    set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
!   set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
  					    arm_extract_struct_value_address);
  
    /* Single stepping.  */
--- 2936,2942 ----
    set_gdbarch_deprecated_store_return_value (gdbarch, arm_store_return_value);
    set_gdbarch_store_struct_return (gdbarch, arm_store_struct_return);
    set_gdbarch_use_struct_convention (gdbarch, arm_use_struct_convention);
!   set_gdbarch_extract_struct_value_address (gdbarch,
  					    arm_extract_struct_value_address);
  
    /* Single stepping.  */


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