Subject: port-m68k/573: invalid displacement is displayed in DDB (x/i)
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Masaru Oki <oki@fs.telcom.oki.co.jp>
List: netbsd-bugs
Date: 11/13/1994 22:35:09
>Number:         573
>Category:       port-m68k
>Synopsis:       invalid displacement is displayed in DDB (x/i)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 13 22:35:05 1994
>Originator:     Masaru Oki
>Organization:
"Oki Electric Industry Co, Ltd., Tokyo, Japan."
>Release:        1.0
>Environment:

System: SunOS cotton 4.1.3-JL 1 sun4m
Architecture: sun4

>Description:
	When trying to disassemble 'short branch' instruction
	(brab, bsrb, ...) on m68k NetBSD (1.0_BETA), invalid
	displacement is displayed.

>How-To-Repeat:
      db> x/i bzero,20
>Fix:
--- src/sys/arch/m68k/m68k/db_disasm.c.orig	Fri Jul  1 19:18:53 1994
+++ src/sys/arch/m68k/m68k/db_disasm.c	Mon Nov 14 09:44:11 1994
@@ -885,7 +885,7 @@
 		sz = SIZE_LONG;
 		addchar('l');
 	} else {
-		disp = *(char *)(dbuf->val + 1);
+		disp = *(((char *)dbuf->val) + 1);
 		/*
 		 * XXX gas chokes on this, I am not sure if
 		 * XXX it can even be made to emit it (short of .word)
>Audit-Trail:
>Unformatted:

Masaru Oki