2004-02-19 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / gdb / mcore-tdep.c
index 863a8c3a480266c295dd8025a71821db01dabbb5..6e3df980fd4936064742d9f3174b3d755c7f44d9 100644 (file)
@@ -1,5 +1,7 @@
 /* Target-machine dependent code for Motorola MCore for GDB, the GNU debugger
-   Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+   Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,7 +25,7 @@
 #include "value.h"
 #include "gdbcmd.h"
 #include "regcache.h"
-#include "symfile.h"
+#include "objfiles.h"
 #include "gdbcore.h"
 #include "inferior.h"
 #include "arch-utils.h"
@@ -917,16 +919,13 @@ mcore_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
    argument.
 
    For gdb, this leaves us two routes, based on what
-   USE_STRUCT_CONVENTION (mcore_use_struct_convention) returns.
-   If this macro returns 1, gdb will call STORE_STRUCT_RETURN and
-   EXTRACT_STRUCT_VALUE_ADDRESS.
-
-   If USE_STRUCT_CONVENTION retruns 0, then gdb uses STORE_RETURN_VALUE
-   and EXTRACT_RETURN_VALUE to store/fetch the functions return value. */
+   USE_STRUCT_CONVENTION (mcore_use_struct_convention) returns.  If
+   this macro returns 1, gdb will call STORE_STRUCT_RETURN to store
+   the return value.
 
-/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
-   EXTRACT_RETURN_VALUE?  GCC_P is true if compiled with gcc
-   and TYPE is the type (which is known to be struct, union or array). */
+   If USE_STRUCT_CONVENTION returns 0, then gdb uses
+   STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE to store/fetch the
+   functions return value.  */
 
 static int
 mcore_use_struct_convention (int gcc_p, struct type *type)
@@ -934,16 +933,6 @@ mcore_use_struct_convention (int gcc_p, struct type *type)
   return (TYPE_LENGTH (type) > 8);
 }
 
-/* Where is the return value saved? For MCore, a pointer to 
-   this buffer was passed as a hidden first argument, so
-   just return that address. */
-
-static CORE_ADDR
-mcore_extract_struct_value_address (char *regbuf)
-{
-  return extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
-}
-
 /* Given a function which returns a value of type TYPE, extract the
    the function's return value and place the result into VALBUF.
    REGBUF is the register contents of the target. */
@@ -1071,7 +1060,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
   set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
   set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
-  set_gdbarch_decr_pc_after_break (gdbarch, 0);
   set_gdbarch_breakpoint_from_pc (gdbarch, mcore_breakpoint_from_pc);
   set_gdbarch_deprecated_push_return_address (gdbarch, mcore_push_return_address);
   set_gdbarch_deprecated_push_arguments (gdbarch, mcore_push_arguments);
@@ -1086,10 +1074,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_deprecated_extract_return_value (gdbarch, 
                                               mcore_extract_return_value);
   set_gdbarch_deprecated_store_struct_return (gdbarch, mcore_store_struct_return);
-  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, 
-                                                      mcore_extract_struct_value_address);
   set_gdbarch_skip_prologue (gdbarch, mcore_skip_prologue);
-  set_gdbarch_frame_args_skip (gdbarch, 0);
   set_gdbarch_deprecated_frame_args_address (gdbarch, mcore_frame_args_address);
   set_gdbarch_deprecated_frame_locals_address (gdbarch, mcore_frame_locals_address);
   set_gdbarch_deprecated_pop_frame (gdbarch, mcore_pop_frame);
This page took 0.025596 seconds and 4 git commands to generate.