Fix typo in gdb.python/py-objfile.exp
[deliverable/binutils-gdb.git] / gdb / m32c-tdep.c
index d6bc4820cd044846b61f43a727d48ff828f7f8fe..60b5cfb6420879f2dade14a2b318f39741e942e3 100644 (file)
@@ -1,6 +1,6 @@
 /* Renesas M32C target-dependent code for GDB, the GNU debugger.
 
-   Copyright (C) 2004-2014 Free Software Foundation, Inc.
+   Copyright (C) 2004-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-
-#include <stdarg.h>
-
-#include <string.h>
-#include "gdb_assert.h"
 #include "elf-bfd.h"
 #include "elf/m32c.h"
 #include "gdb/sim-m32c.h"
@@ -40,6 +35,7 @@
 #include "reggroups.h"
 #include "prologue-value.h"
 #include "target.h"
+#include "objfiles.h"
 
 \f
 /* The m32c tdep structure.  */
@@ -1014,6 +1010,19 @@ m32c_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pc, int *len)
 \f
 /* Prologue analysis.  */
 
+enum m32c_prologue_kind
+{
+  /* This function uses a frame pointer.  */
+  prologue_with_frame_ptr,
+
+  /* This function has no frame pointer.  */
+  prologue_sans_frame_ptr,
+
+  /* This function sets up the stack, so its frame is the first
+     frame on the stack.  */
+  prologue_first_frame
+};
+
 struct m32c_prologue
 {
   /* For consistency with the DWARF 2 .debug_frame info generated by
@@ -1023,18 +1032,7 @@ struct m32c_prologue
   /* The architecture for which we generated this prologue info.  */
   struct gdbarch *arch;
 
-  enum {
-    /* This function uses a frame pointer.  */
-    prologue_with_frame_ptr,
-
-    /* This function has no frame pointer.  */
-    prologue_sans_frame_ptr,
-
-    /* This function sets up the stack, so its frame is the first
-       frame on the stack.  */
-    prologue_first_frame
-
-  } kind;
+  enum m32c_prologue_kind kind;
 
   /* If KIND is prologue_with_frame_ptr, this is the offset from the
      CFA to where the frame pointer points.  This is always zero or
@@ -1104,6 +1102,13 @@ m32c_pv_push (struct m32c_pv_state *state, pv_t value, int size)
 }
 
 
+enum srcdest_kind
+{
+  srcdest_reg,
+  srcdest_partial_reg,
+  srcdest_mem
+};
+
 /* A source or destination location for an m16c or m32c
    instruction.  */
 struct srcdest
@@ -1112,7 +1117,7 @@ struct srcdest
      If srcdest_partial_reg, the location is part of a register pointed
      to by REG.  We don't try to handle this too well.
      If srcdest_mem, the location is memory whose address is ADDR.  */
-  enum { srcdest_reg, srcdest_partial_reg, srcdest_mem } kind;
+  enum srcdest_kind kind;
   pv_t *reg, addr;
 };
 
@@ -2247,8 +2252,7 @@ m32c_return_value (struct gdbarch *gdbarch,
            error (_("The return value is stored in memory at 'mem0', "
                     "but GDB cannot find\n"
                     "its address."));
-         read_memory (MSYMBOL_VALUE_ADDRESS (mem0.minsym), readbuf,
-                      valtype_len);
+         read_memory (BMSYMBOL_VALUE_ADDRESS (mem0), readbuf, valtype_len);
        }
     }
 
@@ -2280,8 +2284,7 @@ m32c_return_value (struct gdbarch *gdbarch,
            error (_("The return value is stored in memory at 'mem0', "
                     "but GDB cannot find\n"
                     " its address."));
-         write_memory (MSYMBOL_VALUE_ADDRESS (mem0.minsym), writebuf,
-                       valtype_len);
+         write_memory (BMSYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len);
        }
     }
 
@@ -2507,7 +2510,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
       else
        {
          /* The trampoline's address is our pointer.  */
-         addr = MSYMBOL_VALUE_ADDRESS (tramp_msym.minsym);
+         addr = BMSYMBOL_VALUE_ADDRESS (tramp_msym);
        }
     }
 
@@ -2560,7 +2563,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
               /* If we do have such a symbol, return its value as the
                  function's true address.  */
               if (func_msym.minsym)
-                ptr = MSYMBOL_VALUE_ADDRESS (func_msym.minsym);
+                ptr = BMSYMBOL_VALUE_ADDRESS (func_msym);
             }
         }
       else
This page took 0.029763 seconds and 4 git commands to generate.