This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA]: alpha-tdep.c/heuristic_fencepost_start
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [RFA]: alpha-tdep.c/heuristic_fencepost_start
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 21 Jul 2000 16:57:36 -0700
- Newsgroups: cygnus.patches.gdb
- Organization: Cygnus Solutions
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;
}