PERFORCE change 30911 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri May 9 22:27:52 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30911
Change 30911 by marcel at marcel_nfs on 2003/05/09 22:27:32
Really fix the nat computation. There was a bug in the unwinder
that confused me. While here, don't return garbage for out-of-
frame registers. Complain instead...
Affected files ...
.. //depot/projects/ia64_epc/sys/ia64/ia64/db_interface.c#8 edit
Differences ...
==== //depot/projects/ia64_epc/sys/ia64/ia64/db_interface.c#8 (text+ko) ====
@@ -234,8 +234,8 @@
bsp = ddb_regs.tf_special.bspstore + ddb_regs.tf_special.ndirty;
regno = (db_expr_t)vp->valuep - 32;
- sof = ddb_regs.tf_special.cfm & 0x7f;
- nats = (((sof - regno) << 3) + 62 - ((bsp >> 3) & 0x3f)) / 63;
+ sof = (int)(ddb_regs.tf_special.cfm & 0x7f);
+ nats = (sof - regno + 63 - ((int)(bsp >> 3) & 0x3f)) / 63;
reg = (void*)(bsp - ((sof - regno + nats) << 3));
@@ -465,18 +465,16 @@
if (regno >= 14 && regno <= 31)
return ((®s->tf_scratch.gr14)[regno - 14]);
- if (regno > 0 && regno < 128) {
+ sof = (int)(regs->tf_special.cfm & 0x7f);
+ if (regno >= 32 && regno < sof + 32) {
bsp = regs->tf_special.bspstore + regs->tf_special.ndirty;
regno -= 32;
- sof = regs->tf_special.cfm & 0x7f;
- nats = (((sof - regno) << 3) + 62 - ((bsp >> 3) & 0x3f)) / 63;
+ nats = (sof - regno + 63 - ((int)(bsp >> 3) & 0x3f)) / 63;
rsp = (void*)(bsp - ((sof - regno + nats) << 3));
- if (regno < sof)
- return (*rsp);
- return (0xdeadbeefdeadbeef);
+ return (*rsp);
}
- db_printf(" **** STRANGE REGISTER NUMBER %d **** ", regno + 32);
+ db_printf(" **** STRANGE REGISTER NUMBER %d **** ", regno);
return (0);
}
More information about the p4-projects
mailing list