NetBSD Problem Report #40300
From bouyer@antioche.lip6.fr Tue Dec 30 16:55:00 2008
Return-Path: <bouyer@antioche.lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id C2E3B63B8C6
for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Dec 2008 16:54:59 +0000 (UTC)
Message-Id: <200812301654.mBUGsu22001407@armandeche.lip6.fr>
Date: Tue, 30 Dec 2008 17:54:56 +0100 (MET)
From: Manuel BOUYER <bouyer@antioche.lip6.fr>
Reply-To: bouyer@antioche.lip6.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: 'target kvm' doesn't work on alpha
X-Send-Pr-Version: 3.95
>Number: 40300
>Category: toolchain
>Synopsis: 'target kvm' doesn't work on alpha
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 30 16:55:00 +0000 2008
>Closed-Date:
>Last-Modified: Thu Jan 05 19:35:00 +0000 2012
>Originator: bouyer@antioche.lip6.fr
>Release: NetBSD 5.0_BETA
>Organization:
>Environment:
System: NetBSD armandeche 5.0_BETA NetBSD 5.0_BETA (GENERIC-$Revision: 1.325 $) #2: Wed Dec 24 14:55:58 CET 2008 bouyer@roll:/dsk/l1/misc/bouyer/tmp/alpha/obj/dsk/l1/misc/bouyer/netbsd-5/src/sys/arch/alpha/compile/ARMANDECHE alpha
Architecture: alpha
Machine: alpha
>Description:
'target kvm' doesn't exist in alpha--netbsd-gdb built from
build.sh. Quoting Martin Husemann:
src/gnu/usr.bin/gdb6/arch/alpha/defs.mk:
G_LIBGDB_OBS does not contain bsd-kvm.o
No idea why mknative did not pick it up or if it would work if you add it.
I tried adding bsd-kvm.o to G_LIBGDB_OBS but it seems it's not enough.
>How-To-Repeat:
try "target kvm" in gdb targetted for NetBSD/alpha
>Fix:
please :)
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: Manuel BOUYER <bouyer@antioche.lip6.fr>
Cc: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Sun, 4 Jan 2009 01:53:37 +0000
On Tue, Dec 30, 2008 at 04:55:00PM +0000, Manuel BOUYER wrote:
> >Synopsis: 'target kvm' doesn't work on alpha
> 'target kvm' doesn't exist in alpha--netbsd-gdb built from
> build.sh. Quoting Martin Husemann:
> src/gnu/usr.bin/gdb6/arch/alpha/defs.mk:
>
> G_LIBGDB_OBS does not contain bsd-kvm.o
>
> No idea why mknative did not pick it up or if it would work if you add it.
>
> I tried adding bsd-kvm.o to G_LIBGDB_OBS but it seems it's not enough.
I had the displeasure of digging around in gdb config recently, so
while I'm far from an expert I think I know what's wrong.
It looks as if you need to add a call to bsd_kvm_add_target() to
_initialize_alphabsd_nat() at the bottom of
src/gnu/dist/gdb6/gdb/alphabsd-nat.c, akin to the one in
i386nbsd-nat.c.
To do it properly you also need to add bsd-kvm.o to NATDEPFILES in
src/gnu/dist/gdb6/gdb/config/alpha/nbsd.mh, and rerun mknative in all
its full glory.
mipsnbsd-nat.c and config/mips/nbsd.mh also appear to be missing this,
and maybe other targets too.
--
David A. Holland
dholland@netbsd.org
From: Nick Hudson <nick.hudson@gmx.co.uk>
To: gnats-bugs@netbsd.org
Cc: port-alpha-maintainer@netbsd.org,
gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org,
bouyer@antioche.lip6.fr
Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Sun, 4 Jan 2009 11:11:46 +0000
On Sunday 04 January 2009 01:55:03 David Holland wrote:
> The following reply was made to PR port-alpha/40300; it has been noted by
> GNATS.
>
> From: David Holland <dholland-bugs@netbsd.org>
> To: Manuel BOUYER <bouyer@antioche.lip6.fr>
> Cc: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
> netbsd-bugs@netbsd.org, gnats-bugs@netbsd.org
> Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
> Date: Sun, 4 Jan 2009 01:53:37 +0000
>
> On Tue, Dec 30, 2008 at 04:55:00PM +0000, Manuel BOUYER wrote:
> > >Synopsis: 'target kvm' doesn't work on alpha
> >
> > 'target kvm' doesn't exist in alpha--netbsd-gdb built from
> > build.sh. Quoting Martin Husemann:
> > src/gnu/usr.bin/gdb6/arch/alpha/defs.mk:
> >
> > G_LIBGDB_OBS does not contain bsd-kvm.o
> >
> > No idea why mknative did not pick it up or if it would work if you add
> > it.
> >
> > I tried adding bsd-kvm.o to G_LIBGDB_OBS but it seems it's not
> > enough.
>
> I had the displeasure of digging around in gdb config recently, so
> while I'm far from an expert I think I know what's wrong.
>
> It looks as if you need to add a call to bsd_kvm_add_target() to
> _initialize_alphabsd_nat() at the bottom of
> src/gnu/dist/gdb6/gdb/alphabsd-nat.c, akin to the one in
> i386nbsd-nat.c.
>
> To do it properly you also need to add bsd-kvm.o to NATDEPFILES in
> src/gnu/dist/gdb6/gdb/config/alpha/nbsd.mh, and rerun mknative in all
> its full glory.
This is correct. All the effort (not much really) is in getting
alphabsd_supply_pcb right.
Nick
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Mon, 05 Jan 2009 04:30:32 +1100
"target kvm" doesn't work on a cross-gdb.
this PR is not alpha specific.
.mrg.
From: David Holland <dholland-bugs@netbsd.org>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@NetBSD.org, port-alpha-maintainer@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Sun, 4 Jan 2009 20:00:21 +0000
On Mon, Jan 05, 2009 at 04:30:32AM +1100, matthew green wrote:
>
> "target kvm" doesn't work on a cross-gdb.
>
> this PR is not alpha specific.
The .mh files missing kvm are
alpha/nbsd.mh
mips/nbsd.mh
pa/nbsd.mh
sh/nbsd.mh
(and arm/nbsdaout.mh, m68k/nbsdaout.mh, which might not matter.)
--
David A. Holland
dholland@netbsd.org
Responsible-Changed-From-To: port-alpha-maintainer->toolchain-maintainer
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 04 Jan 2009 20:09:24 +0000
Responsible-Changed-Why:
gdb config issue affecting several platforms, change category to toolchain
Responsible-Changed-From-To: toolchain-maintainer->toolchain-manager
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 04 Jan 2009 20:11:54 +0000
Responsible-Changed-Why:
Oops. (and after I carefully went and looked up the right thing, I couldn't
manage to type it in correctly...)
From: matthew green <mrg@eterna.com.au>
To: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Cc:
Subject: re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Mon, 05 Jan 2009 17:21:53 +1100
"target kvm" doesn't work on a cross-gdb.
this PR is not alpha specific.
actually, i realised that there are two problems:
- alpha has no native "target kvm"
- cross netbsd-gdb has no "target kvm"
the former is fairly easy to fix, and the fixes have been discussed
already, but the latter i'm not sure about at all.
.mrg.
From: David Holland <dholland-bugs@netbsd.org>
To: matthew green <mrg@eterna.com.au>
Cc: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Mon, 5 Jan 2009 07:19:02 +0000
On Mon, Jan 05, 2009 at 05:21:53PM +1100, matthew green wrote:
> actually, i realised that there are two problems:
>
> - alpha has no native "target kvm"
>
> - cross netbsd-gdb has no "target kvm"
>
> the former is fairly easy to fix, and the fixes have been discussed
> already, but the latter i'm not sure about at all.
Right, but I don't think this PR is about the latter. (Manuel? Do you
need it to work in a cross-gdb?)
--
David A. Holland
dholland@netbsd.org
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@NetBSD.org, gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Mon, 5 Jan 2009 15:53:26 +0100
On Mon, Jan 05, 2009 at 07:20:02AM +0000, David Holland wrote:
> The following reply was made to PR toolchain/40300; it has been noted by GNATS.
>
> From: David Holland <dholland-bugs@netbsd.org>
> To: matthew green <mrg@eterna.com.au>
> Cc: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
> netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
> Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
> Date: Mon, 5 Jan 2009 07:19:02 +0000
>
> On Mon, Jan 05, 2009 at 05:21:53PM +1100, matthew green wrote:
> > actually, i realised that there are two problems:
> >
> > - alpha has no native "target kvm"
> >
> > - cross netbsd-gdb has no "target kvm"
> >
> > the former is fairly easy to fix, and the fixes have been discussed
> > already, but the latter i'm not sure about at all.
>
> Right, but I don't think this PR is about the latter. (Manuel? Do you
> need it to work in a cross-gdb?)
Actually yes, it is what I was trying to do. The most powerfull boxes at
work are running linux so it's where I build NetBSD bits, including
kernels ...
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--
From: David Holland <dholland-bugs@netbsd.org>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: gnats-bugs@NetBSD.org, toolchain-manager@NetBSD.org,
gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-alpha/40300: 'target kvm' doesn't work on alpha
Date: Thu, 8 Jan 2009 06:06:15 +0000
On Mon, Jan 05, 2009 at 03:53:26PM +0100, Manuel Bouyer wrote:
> > > actually, i realised that there are two problems:
> > >
> > > - alpha has no native "target kvm"
> > >
> > > - cross netbsd-gdb has no "target kvm"
> > >
> > > the former is fairly easy to fix, and the fixes have been discussed
> > > already, but the latter i'm not sure about at all.
> >
> > Right, but I don't think this PR is about the latter. (Manuel? Do you
> > need it to work in a cross-gdb?)
>
> Actually yes, it is what I was trying to do. The most powerfull boxes at
> work are running linux so it's where I build NetBSD bits, including
> kernels ...
I suspect this is going to be difficult, because gdb thinks it's a
host thing, not a target thing.
You could try adding it to the .mh and *-nat.c files corresponding to
the Linux build host you're using and see what happens, but that's not
very likely to work.
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 31 Dec 2011 19:31:18 +0000
State-Changed-Why:
Anyone know if this is improved with the new gdb?
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 03 Jan 2012 14:42:33 +0000
State-Changed-Why:
jdc says it isn't.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, toolchain-manager@netbsd.org,
netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, dholland@NetBSD.org,
bouyer@antioche.lip6.fr
Cc:
Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
Date: Tue, 3 Jan 2012 13:21:28 -0500
On Jan 3, 2:42pm, dholland@NetBSD.org (dholland@NetBSD.org) wrote:
-- Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
| Synopsis: 'target kvm' doesn't work on alpha
|
| State-Changed-From-To: feedback->open
| State-Changed-By: dholland@NetBSD.org
| State-Changed-When: Tue, 03 Jan 2012 14:42:33 +0000
| State-Changed-Why:
| jdc says it isn't.
I don't have access to an alpha anymore, so unless we get a better description
of the error, or access to a machine or simulator, I doubt this will be fixed.
christos
From: Nick Hudson <nick.hudson@gmx.co.uk>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@netbsd.org,
toolchain-manager@netbsd.org,
netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org,
dholland@netbsd.org,
bouyer@antioche.lip6.fr
Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
Date: Wed, 4 Jan 2012 07:51:57 +0000
--Boundary-00=_dUABPAjl6m5nnUd
Content-Type: Text/Plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
On Tuesday 03 January 2012 18:21:28 Christos Zoulas wrote:
> On Jan 3, 2:42pm, dholland@NetBSD.org (dholland@NetBSD.org) wrote:
> -- Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
This diff fixes live kernel target kvm for me - haven't tried crash dump.
Not sure if it's right.
Nick
--Boundary-00=_dUABPAjl6m5nnUd
Content-Type: text/x-patch;
charset="ISO-8859-1";
name="alphabsd-nat.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="alphabsd-nat.c.diff"
Index: alphabsd-nat.c
===================================================================
RCS file: /cvsroot/src/external/gpl3/gdb/dist/gdb/alphabsd-nat.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 alphabsd-nat.c
--- alphabsd-nat.c 10 Oct 2011 22:18:08 -0000 1.3
+++ alphabsd-nat.c 4 Jan 2012 07:50:37 -0000
@@ -180,6 +180,7 @@ alphabsd_supply_pcb (struct regcache *re
return 0;
regcache_raw_supply (regcache, ALPHA_SP_REGNUM, &pcb->pcb_hw.apcb_ksp);
+ regcache_raw_supply (regcache, ALPHA_GCC_FP_REGNUM, &pcb->pcb_hw.apcb_ksp);
for (regnum = ALPHA_S0_REGNUM; regnum < ALPHA_A0_REGNUM; regnum++)
regcache_raw_supply (regcache, regnum,
--Boundary-00=_dUABPAjl6m5nnUd--
From: Nicolas Joly <njoly@pasteur.fr>
To: Nick Hudson <nick.hudson@gmx.co.uk>
Cc: Christos Zoulas <christos@zoulas.com>, gnats-bugs@netbsd.org,
toolchain-manager@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org, dholland@netbsd.org,
bouyer@antioche.lip6.fr
Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
Date: Thu, 5 Jan 2012 19:02:36 +0100
On Wed, Jan 04, 2012 at 07:51:57AM +0000, Nick Hudson wrote:
> On Tuesday 03 January 2012 18:21:28 Christos Zoulas wrote:
> > On Jan 3, 2:42pm, dholland@NetBSD.org (dholland@NetBSD.org) wrote:
> > -- Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
>
> This diff fixes live kernel target kvm for me - haven't tried crash dump.
>
> Not sure if it's right.
Still no luck on crash dump for me.
njoly@thanos [/misc/crash]> gdb netbsd.1.gdb
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation,Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY,to the extent permitted by law. Type "show
copying"
and "show warranty"for details.
This GDB was configured as "alpha--netbsd".
For bug reporting instructions,please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /misc/crash/netbsd.1.gdb...done.
(gdb) target kvm netbsd.1.core
#0 <unavailable> in ?? ()
(gdb) bt
#0 <unavailable> in ?? ()
PC not available
--
Nicolas Joly
Projects and Developments in Bioinformatics
Institut Pasteur, Paris.
From: Nick Hudson <nick.hudson@gmx.co.uk>
To: Nicolas Joly <njoly@pasteur.fr>
Cc: Christos Zoulas <christos@zoulas.com>,
gnats-bugs@netbsd.org,
toolchain-manager@netbsd.org,
netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org,
dholland@netbsd.org,
bouyer@antioche.lip6.fr
Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
Date: Thu, 5 Jan 2012 19:25:44 +0000
On Thursday 05 January 2012 18:02:36 Nicolas Joly wrote:
> Still no luck on crash dump for me.
How did you crate your crash dump?
Nick
From: Nicolas Joly <njoly@pasteur.fr>
To: Nick Hudson <nick.hudson@gmx.co.uk>
Cc: Nicolas Joly <njoly@pasteur.fr>, Christos Zoulas <christos@zoulas.com>,
gnats-bugs@netbsd.org, toolchain-manager@netbsd.org,
netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, dholland@netbsd.org,
bouyer@antioche.lip6.fr
Subject: Re: toolchain/40300 ('target kvm' doesn't work on alpha)
Date: Thu, 5 Jan 2012 20:33:49 +0100
On Thu, Jan 05, 2012 at 07:25:44PM +0000, Nick Hudson wrote:
> On Thursday 05 January 2012 18:02:36 Nicolas Joly wrote:
> > Still no luck on crash dump for me.
>
> How did you crate your crash dump?
This is a dump from a machine crash that occured on october 5.
njoly@thanos [/misc/crash]> dmesg -M netbsd.1.core -N netbsd.1.gdb
[...]
CPU 0: fatal kernel trap:
CPU 0 trap entry = 0x4 (unaligned access fault)
CPU 0 a0 = 0xfffffc002364dff9
CPU 0 a1 = 0x29
CPU 0 a2 = 0xb
CPU 0 pc = 0xfffffc0000989ab4
CPU 0 ra = 0xfffffc00009897e8
CPU 0 pv = 0xfffffc00007c4998
CPU 0 curlwp = 0xfffffc00195bade0
CPU 0 pid = 23539,comm = ssh
panic: trap
cpu0: Begin traceback...
alpha trace requires known PC =eject=
cpu0: End traceback...
dumping to dev 4,1 offset 2884575
dump
--
Nicolas Joly
Projects and Developments in Bioinformatics
Institut Pasteur, Paris.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.