PERFORCE change 28895 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Apr 13 15:57:10 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=28895
Change 28895 by marcel at marcel_nfs on 2003/04/13 15:56:20
There's no point creating an initial register state based on
the current context, because as soon as we return to the
caller, the context will be invalid.
Affected files ...
.. //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#3 edit
.. //depot/projects/ia64_epc/sys/ia64/include/unwind.h#3 edit
Differences ...
==== //depot/projects/ia64_epc/sys/ia64/ia64/unwind.c#3 (text+ko) ====
@@ -103,23 +103,6 @@
return (NULL);
}
-int
-unw_state_create(struct unw_regstate *rs)
-{
- struct pcb pcb;
-
- savectx(&pcb);
- /* Cache the values. */
- rs->rs_val.special = pcb.pcb_special;
- rs->rs_val.preserved = pcb.pcb_preserved;
- rs->rs_val.preserved_fp = pcb.pcb_preserved_fp;
- /* Set the location to 'self' (ie in the register itself). */
- memset(&rs->rs_loc.special, 0, sizeof(rs->rs_loc.special));
- memset(&rs->rs_loc.preserved, 0, sizeof(rs->rs_loc.preserved));
- memset(&rs->rs_loc.preserved_fp, 0, sizeof(rs->rs_loc.preserved_fp));
- return (0);
-}
-
static __inline void
unw_set_loc(void *rs, void *pcb, int sz)
{
@@ -131,9 +114,13 @@
}
int
-unw_state_create_from_pcb(struct unw_regstate *rs, struct pcb *pcb)
+unw_state_create(struct unw_regstate *rs, struct pcb *pcb)
{
+ uint64_t *fp;
+ /* Set the current IP to the code address of savectx. */
+ fp = (void*)savectx;
+ rs->rs_val.special.iip = *fp;
/* Cache the values. */
rs->rs_val.special = pcb->pcb_special;
rs->rs_val.preserved = pcb->pcb_preserved;
==== //depot/projects/ia64_epc/sys/ia64/include/unwind.h#3 (text+ko) ====
@@ -53,8 +53,7 @@
struct _unw_regs rs_loc;
};
-int unw_state_create(struct unw_regstate *);
-int unw_state_create_from_pcb(struct unw_regstate *, struct pcb *);
+int unw_state_create(struct unw_regstate *, struct pcb *);
int unw_table_add(uint64_t, uint64_t, uint64_t);
void unw_table_remove(uint64_t);
More information about the p4-projects
mailing list