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]

[RFA]: alpha-tdep.c/heuristic_fencepost_start


Appologies, I sent this out as a patch when what I really want
is approval and validation.  Can someone who knows the alpha
take a look at this for me?

This is the tail end of "heuristic_fencepost_start".
Does the change make sense?


*** 428,433 ****
--- 577,590 ----
    return read_memory_integer (pc, 4) == 0x6bfa8001;
  }

+ /* Nonzero if instruction at PC is "lda sp, x(sp)". */
+
+ static int
+ alpha_is_sp_adjust (pc)
+      CORE_ADDR pc;
+ {
+   return (read_memory_integer (pc, 4) & 0xffff0000) == 0x23de0000;
+ }


  /* This fencepost looks highly suspicious to me.  Removing it also
***************
*** 481,490 ****

        return 0;
        }
!     else if (alpha_about_to_return (start_pc))
        break;

-   start_pc += 4;              /* skip return */
    return start_pc;
  }

--- 639,647 ----

        return 0;
        }
!     else if (alpha_is_sp_adjust (start_pc))
        break;

    return start_pc;
  }

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