From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 29524 invoked from network); 13 Jul 1998 03:27:07 -0000 Received: from ripspost.aist.go.jp (150.29.9.2) by mail2.redhat.com with SMTP; 13 Jul 1998 03:27:07 -0000 Received: from bhalpha1.nibh.go.jp ([150.29.66.225]) by ripspost.aist.go.jp (8.8.8+2.7Wbeta7/3.6W) with SMTP id MAA02644 for ; Mon, 13 Jul 1998 12:26:50 +0900 (JST) Date: Mon, 13 Jul 1998 12:26:17 +0900 (JST) From: Tom Holroyd X-Sender: tomh@bhalpha1.nibh.go.jp To: axp-list@redhat.COM Subject: debugging unaligned traps In-Reply-To: <199807130243.WAA01889@alpha1.estabrook.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII The addresses reported by the kernel seem to be different from what I see with gdb. E.g., the program uac.c: main() { int i, j; char *b, buf[10]; for (i = 0; i < 4; i++) { b = &buf[i]; printf("b = 0x%016lX\n", b); j = *((int *)b); } } produces output b = 0x000000011FFFFBD8 b = 0x000000011FFFFBD9 b = 0x000000011FFFFBDA b = 0x000000011FFFFBDB and kernel messages unaligned trap at 000000000000001e: 000000011ffffbd9 22 1 unaligned trap at 000000000000001e: 000000011ffffbda 22 1 unaligned trap at 000000000000001e: 000000011ffffbdb 22 1 but gdb reports that main looks like this (gcc -g uac.c -o uac): 0x120000700
: 27bb0011 ldah gp,17(t12) 0x120000704 : 23bd8180 lda gp,-32384(gp) 0x120000708 : 23deffd0 lda sp,-48(sp) 0x12000070c : b75e0000 stq ra,0(sp) 0x120000710 : b5fe0008 stq fp,8(sp) 0x120000714 : 47de040f mov sp,fp ... 0x120000784 : 6bfa8001 ret zero,(ra),0x1 That is, the data addresses are correct, but where is that 0x1e coming from? P.S. My X server says: X(4158): unaligned trap at 0000000000000024: 00000001205ad80f 28 2 The PC of 0x24 is clearly junk in this case. Dr. Tom Holroyd Behavior Control Lab, Human Informatics Dept. The basis of National Institute of Bioscience and Human-Technology stability is 1-1 Higashi, Tsukuba-shi, Ibaraki 305, Japan instability. The 9th Amendment of the U.S. Constitution: "The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people."