*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / m68hc11-tdep.c
index 7d5e553450302523878a6ab1125ae2609867d619..b789ce72c872b84198a6b03370305179c3468cf4 100644 (file)
    MSYMBOL_IS_RTC       Tests the "RTC" bit in a minimal symbol.
    MSYMBOL_IS_RTI       Tests the "RTC" bit in a minimal symbol.  */
 
-#define MSYMBOL_SET_RTC(msym)                                           \
+#define MSYMBOL_SET_RTC(msym)                           \
         MSYMBOL_TARGET_FLAG_1 (msym) = 1
 
-#define MSYMBOL_SET_RTI(msym)                                           \
+#define MSYMBOL_SET_RTI(msym)                           \
         MSYMBOL_TARGET_FLAG_2 (msym) = 1
 
 #define MSYMBOL_IS_RTC(msym)                           \
@@ -279,7 +279,7 @@ m68hc11_which_soft_register (CORE_ADDR addr)
 /* Fetch a pseudo register.  The 68hc11 soft registers are treated like
    pseudo registers.  They are located in memory.  Translate the register
    fetch into a memory read.  */
-static void
+static enum register_status
 m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
                              struct regcache *regcache,
                              int regno, gdb_byte *buf)
@@ -292,8 +292,11 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
     {
       ULONGEST pc;
       const int regsize = 4;
+      enum register_status status;
 
-      regcache_cooked_read_unsigned (regcache, HARD_PC_REGNUM, &pc);
+      status = regcache_cooked_read_unsigned (regcache, HARD_PC_REGNUM, &pc);
+      if (status != REG_VALID)
+       return status;
       if (pc >= 0x8000 && pc < 0xc000)
         {
           ULONGEST page;
@@ -304,7 +307,7 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
           pc += 0x1000000;
         }
       store_unsigned_integer (buf, regsize, byte_order, pc);
-      return;
+      return REG_VALID;
     }
 
   m68hc11_initialize_register_info ();
@@ -318,6 +321,8 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
     {
       memset (buf, 0, 2);
     }
+
+  return REG_VALID;
 }
 
 /* Store a pseudo register.  Translate the register store
@@ -398,9 +403,8 @@ m68hc11_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
 }
 
 \f
-/* 68HC11 & 68HC12 prologue analysis.
+/* 68HC11 & 68HC12 prologue analysis.  */
 
- */
 #define MAX_CODES 12
 
 /* 68HC11 opcodes.  */
@@ -673,8 +677,8 @@ m68hc11_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
      We limit the search to 128 bytes so that the algorithm is bounded
      in case of random and wrong code.  We also stop and abort if
      we find an instruction which is not supposed to appear in the
-     prologue (as generated by gcc 2.95, 2.96).
-  */
+     prologue (as generated by gcc 2.95, 2.96).  */
+
   func_end = pc + 128;
   found_frame_point = 0;
   info->size = 0;
@@ -767,7 +771,8 @@ m68hc11_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
   ULONGEST pc;
 
-  pc = frame_unwind_register_unsigned (next_frame, gdbarch_pc_regnum (gdbarch));
+  pc = frame_unwind_register_unsigned (next_frame,
+                                      gdbarch_pc_regnum (gdbarch));
   return pc;
 }
 
@@ -775,7 +780,7 @@ m68hc11_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
    the saved registers of frame described by FRAME_INFO.  This
    includes special registers such as pc and fp saved in special ways
    in the stack frame.  sp is even more special: the address we return
-   for it IS the sp for the next frame. */
+   for it IS the sp for the next frame.  */
 
 static struct m68hc11_unwind_cache *
 m68hc11_frame_unwind_cache (struct frame_info *this_frame,
@@ -851,7 +856,7 @@ m68hc11_frame_unwind_cache (struct frame_info *this_frame,
     }
 
   /* Add 1 here to adjust for the post-decrement nature of the push
-     instruction.*/
+     instruction.  */
   info->prev_sp = prev_sp;
 
   info->base = this_base;
@@ -944,6 +949,7 @@ m68hc11_frame_prev_register (struct frame_info *this_frame,
 
 static const struct frame_unwind m68hc11_frame_unwind = {
   NORMAL_FRAME,
+  default_frame_unwind_stop_reason,
   m68hc11_frame_this_id,
   m68hc11_frame_prev_register,
   NULL,
@@ -1065,7 +1071,7 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
       V = (l & M6811_V_BIT) != 0;
       C = (l & M6811_C_BIT) != 0;
 
-      /* Print flags following the h8300  */
+      /* Print flags following the h8300.  */
       if ((C | Z) == 0)
        fprintf_filtered (file, "u> ");
       else if ((C | Z) == 1)
@@ -1439,7 +1445,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
   else
     elf_flags = 0;
 
-  /* try to find a pre-existing architecture */
+  /* Try to find a pre-existing architecture.  */
   for (arches = gdbarch_list_lookup_by_info (arches, &info);
        arches != NULL;
        arches = gdbarch_list_lookup_by_info (arches->next, &info))
@@ -1450,7 +1456,7 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
       return arches->gdbarch;
     }
 
-  /* Need a new architecture. Fill in a target specific vector.  */
+  /* Need a new architecture.  Fill in a target specific vector.  */
   tdep = (struct gdbarch_tdep *) xmalloc (sizeof (struct gdbarch_tdep));
   gdbarch = gdbarch_alloc (&info, tdep);
   tdep->elf_flags = elf_flags;
@@ -1549,7 +1555,8 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
   return gdbarch;
 }
 
-extern initialize_file_ftype _initialize_m68hc11_tdep; /* -Wmissing-prototypes */
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_m68hc11_tdep;
 
 void
 _initialize_m68hc11_tdep (void)
This page took 0.033694 seconds and 4 git commands to generate.