Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Tom Holroyd <tomh@taz.ccs.fau.edu>
To: axp-list@redhat.COM
Subject: debugging unaligned traps
Date: Mon, 13 Jul 1998 12:26:17 +0900 (JST)	[thread overview]
Message-ID: <Pine.LNX.3.96.980713120015.4488A-100000@bhalpha1.nibh.go.jp> (raw)
In-Reply-To: <199807130243.WAA01889@alpha1.estabrook.org>

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 <main>:             27bb0011  ldah       gp,17(t12)
0x120000704 <main+4>:           23bd8180  lda        gp,-32384(gp)
0x120000708 <main+8>:           23deffd0  lda        sp,-48(sp)
0x12000070c <main+12>:          b75e0000  stq        ra,0(sp)
0x120000710 <main+16>:          b5fe0008  stq        fp,8(sp)
0x120000714 <main+20>:          47de040f  mov        sp,fp
...
0x120000784 <main+132>:         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."


  reply	other threads:[~1998-07-13  3:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-10 19:37 BT-958 = IRQ 24??? Jiann-Ming Su
1998-07-10 11:18 ` Jay.Estabrook
1998-07-10 20:26   ` Jiann-Ming Su
1998-07-12 17:43     ` Jay.Estabrook
1998-07-13  3:26       ` Tom Holroyd [this message]
1998-07-13  4:26         ` debugging unaligned traps Quant-X Alpha Linux Support
1998-07-13 10:24         ` Tom Holroyd
1998-07-13 14:35           ` Quant-X Alpha Linux Support
1998-07-13 22:54             ` Steven N. Hirsch
1998-07-14  0:32               ` Quant-X Alpha Linux Support
1998-07-14 14:53             ` Jason Lavoie
1998-07-14 18:20               ` Quant-X Alpha Linux Support
1998-07-13 20:06       ` BT-958 = IRQ 24??? Jiann-Ming Su
1998-07-10 23:25   ` Funky Cursor Joe
  -- strict thread matches above, loose matches on Subject: below --
1998-07-11  7:57 Debugging unaligned traps B. James Phillippe
1998-07-11 11:12 ` Matti Aarnio
1998-07-12  9:17   ` Quant-X Alpha Linux Support
1998-07-11 11:39 ` Maciej W. Rozycki
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox