Subject: Re: sh core dumps
To: None <port-sparc@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: port-sparc
Date: 10/19/2005 22:30:50
On Thu, Oct 20, 2005 at 12:47:00AM +0400, Valeriy E. Ushakov wrote:
> [Starting a new thread to disentangle this from the -mcpu discussion]
...
> The instruction at pc looks totally innocent.
>
> (gdb) x/7i $pc-20
> 0x17400 <argstr+324>: cmp %l6, 0
> 0x17404 <argstr+328>: sethi %hi(0x31000), %l3
> 0x17408 <argstr+332>: be 0x17434 <argstr+376>
> 0x1740c <argstr+336>: sethi %hi(0x30c00), %l7
> 0x17410 <argstr+340>: ld [ %l3 + 0x310 ], %g1
> 0x17414 <argstr+344>: add %g1, -1, %g1 # <-- pc
> 0x17418 <argstr+348>: cmp %g1, 0 # <-- npc
...
> g1 0xe804068c -402389364
Some thoughts...
That value (in %g1) should (probably) never ever end up in a register
in user-space.
Those values for pc and npc are extremely unlikely to end up in the kernel.
Two (obvious) possibilities:
a) a hardware interrupt
b) a fault on the previous instruction that happens after pc is incremented.
So why might it have gone through the fault => core dump path at all?
David
--
David Laight: david@l8s.co.uk