Date: Fri, 9 May 2003 22:27:49 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30911 for review Message-ID: <200305100527.h4A5RnCq032049@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=30911 Change 30911 by marcel@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); }help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305100527.h4A5RnCq032049>
