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] avr: remove some set_gdbarch_deprec* functions


I've just committed the following.

Ted Roth

2003-02-19  Theodore A. Roth  <troth at openavr dot org>

	* avr-tdep.c (avr_extract_return_value): Remove function.
	(avr_store_return_value): Remove function.
	(avr_extract_struct_value_address): Remove function.
	(avr_gdbarch_init): Remove set_gdbarch_deprecated_*() calls.

Index: gdb/avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.23
diff -u -r1.23 avr-tdep.c
--- gdb/avr-tdep.c	8 Jan 2003 17:21:27 -0000	1.23
+++ gdb/avr-tdep.c	19 Feb 2003 20:33:56 -0000
@@ -892,34 +892,6 @@
   return (m2 | (m1 << 8)) * 2;
 }

-/* Figure out where in REGBUF the called function has left its return value.
-   Copy that into VALBUF. */
-
-static void
-avr_extract_return_value (struct type *type, char *regbuf, char *valbuf)
-{
-  int wordsize, len;
-
-  wordsize = 2;
-
-  len = TYPE_LENGTH (type);
-
-  switch (len)
-    {
-    case 1:			/* (char) */
-    case 2:			/* (short), (int) */
-      memcpy (valbuf, regbuf + REGISTER_BYTE (24), 2);
-      break;
-    case 4:			/* (long), (float) */
-      memcpy (valbuf, regbuf + REGISTER_BYTE (22), 4);
-      break;
-    case 8:			/* (double) (doesn't seem to happen, which is good,
-				   because this almost certainly isn't right.  */
-      error ("I don't know how a double is returned.");
-      break;
-    }
-}
-
 /* Returns the return address for a dummy. */

 static CORE_ADDR
@@ -928,35 +900,6 @@
   return entry_point_address ();
 }

-/* Place the appropriate value in the appropriate registers.
-   Primarily used by the RETURN command.  */
-
-static void
-avr_store_return_value (struct type *type, char *valbuf)
-{
-  int wordsize, len, regval;
-
-  wordsize = 2;
-
-  len = TYPE_LENGTH (type);
-  switch (len)
-    {
-    case 1:			/* char */
-    case 2:			/* short, int */
-      regval = extract_address (valbuf, len);
-      write_register (0, regval);
-      break;
-    case 4:			/* long, float */
-      regval = extract_address (valbuf, len);
-      write_register (0, regval >> 16);
-      write_register (1, regval & 0xffff);
-      break;
-    case 8:			/* presumeably double, but doesn't seem to happen */
-      error ("I don't know how to return a double.");
-      break;
-    }
-}
-
 /* Setup the return address for a dummy frame, as called by
    call_function_by_hand.  Only necessary when you are using an empty
    CALL_DUMMY. */
@@ -1067,17 +1010,6 @@
   write_register (0, addr);
 }

-/* Extract from an array REGBUF containing the (raw) register state
-   the address in which a function should return its structure value,
-   as a CORE_ADDR (or an expression that can be used as one). */
-
-static CORE_ADDR
-avr_extract_struct_value_address (char *regbuf)
-{
-  return (extract_address ((regbuf) + REGISTER_BYTE (0),
-			   REGISTER_RAW_SIZE (0)) | AVR_SMEM_START);
-}
-
 /* Setup the function arguments for calling a function in the inferior.

    On the AVR architecture, there are 18 registers (R25 to R8) which are
@@ -1248,23 +1180,17 @@

   set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer);
   set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);
-  set_gdbarch_deprecated_extract_return_value (gdbarch, avr_extract_return_value);
   set_gdbarch_push_arguments (gdbarch, avr_push_arguments);
   set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
   set_gdbarch_push_return_address (gdbarch, avr_push_return_address);
   set_gdbarch_pop_frame (gdbarch, avr_pop_frame);

-  set_gdbarch_deprecated_store_return_value (gdbarch, avr_store_return_value);
-
   set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
   set_gdbarch_store_struct_return (gdbarch, avr_store_struct_return);
-  set_gdbarch_deprecated_extract_struct_value_address
-    (gdbarch, avr_extract_struct_value_address);

   set_gdbarch_frame_init_saved_regs (gdbarch, avr_scan_prologue);
   set_gdbarch_init_extra_frame_info (gdbarch, avr_init_extra_frame_info);
   set_gdbarch_skip_prologue (gdbarch, avr_skip_prologue);
-/*    set_gdbarch_prologue_frameless_p (gdbarch, avr_prologue_frameless_p); */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);

   set_gdbarch_decr_pc_after_break (gdbarch, 0);


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