* defs.h (enum misc_command_type, command_control_type): Enums
[deliverable/binutils-gdb.git] / gdb / a29k-tdep.c
index ce8a91202f1a26ae2a0a2597f8449c07daba510e..04d1fd24db3f4382a78a4536e3a7d14edf1496fa 100644 (file)
@@ -362,7 +362,11 @@ examine_tag(p, is_trans, argcount, msize, mfp_used)
         *msize = tag1 & 0x7ff;
     }
   if (is_trans)
-    *is_trans = ((tag1 & (1<<21)) ? 1 : 0); 
+    *is_trans = ((tag1 & (1<<21)) ? 1 : 0);
+  /* Note that this includes the frame pointer and the return address
+     register, so the actual number of registers of arguments is two less.
+     argcount can be zero, however, sometimes, for strange assembler
+     routines.  */
   if (argcount)
     *argcount = (tag1 >> 16) & 0x1f;
   if (mfp_used)
@@ -418,10 +422,20 @@ init_frame_info (innermost_frame, fci)
       /* Search backward to find the trace-back tag.  However,
         do not trace back beyond the start of the text segment
         (just as a sanity check to avoid going into never-never land).  */
+#if 1
       while (p >= text_start
             && ((insn = read_memory_integer (p, 4)) & TAGWORD_ZERO_MASK) != 0)
        p -= 4;
-      
+#else /* 0 */
+      char pat[4] = {0, 0, 0, 0};
+      char mask[4];
+      char insn_raw[4];
+      store_unsigned_integer (mask, 4, TAGWORD_ZERO_MASK);
+      /* Enable this once target_search is enabled and tested.  */
+      target_search (4, pat, mask, p, -4, text_start, p+1, &p, &insn_raw);
+      insn = extract_unsigned_integer (insn_raw, 4);
+#endif /* 0 */
+
       if (p < text_start)
        {
          /* Couldn't find the trace-back tag.
@@ -845,6 +859,9 @@ push_dummy_frame ()
   write_register (lrnum++, read_register (PC_REGNUM));
   write_register (lrnum++, read_register (NPC_REGNUM));
   write_register (lrnum++, read_register (PC2_REGNUM));
+
+  /* Why are we saving LR0?  What would clobber it? (the dummy frame should
+     be below it on the register stack, no?).  */
   write_register (lrnum++, original_lr0);
 }
 
This page took 0.02847 seconds and 4 git commands to generate.