NetBSD Problem Report #35597
From dyoung@cuw.ojctech.com Wed Feb 14 09:36:58 2007
Return-Path: <dyoung@cuw.ojctech.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 8D65163BCA4
for <gnats-bugs@gnats.NetBSD.org>; Wed, 14 Feb 2007 09:36:58 +0000 (UTC)
Message-Id: <20070214083158.64A5E28035@cuw.ojctech.com>
Date: Wed, 14 Feb 2007 02:31:58 -0600 (CST)
From: dyoung@cuw.ojctech.com
Reply-To: dyoung@cuw.ojctech.com
To: gnats-bugs@NetBSD.org
Cc: dyoung@netbsd.org
Subject: cross-gdb does not grok NetBSD target kcore/kvm
X-Send-Pr-Version: 3.95
>Number: 35597
>Category: toolchain
>Synopsis: cross-gdb does not grok NetBSD target kcore/kvm
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 14 09:40:00 +0000 2007
>Last-Modified: Tue Apr 17 05:05:04 +0000 2007
>Originator: David Young
>Release: NetBSD 4.99.9
>Organization:
CUWiN
>Environment:
System: NetBSD cuw 4.99.9 NetBSD 4.99.9 (nfsgeode) #8: Wed Feb 14 00:39:39 CST 2007 dyoung@cuw.ojctech.com:/u4/dyoung-scratch/scratch-new/i386/O/sys/arch/i386/compile/nfsgeode i386
Architecture: i386
Machine: i386
>Description:
As built by 'env MKCROSSGDB=yes build.sh tools', gdb does not understand
'target kcore' or 'target kvm', so it is not possible to use it to examine
a system dump.
>How-To-Repeat:
Compare the debug targets understood by $TOOLDIR/bin/i386--netbsdelf-gdb,
% /u4/dyoung-scratch/scratch-new/T/bin/i386--netbsdelf-gdb
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are welcome to change it and/or distribute
copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details. This GDB was configured as
"--host=i386-unknown-netbsdelf2.99.10 --target=i386--netbsdelf".
(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol. For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.
List of target subcommands:
target async -- Use a remote computer via a serial line
target core -- Use a core file as a target
target exec -- Use an executable file as a target
target extended-async -- Use a remote computer via a serial line
target extended-remote -- Use a remote computer via a serial line
target remote -- Use a remote computer via a serial line
Type "help target" followed by target subcommand name for
full documentation.
Command name abbreviations are allowed if unambiguous.
(gdb)
with the debug targets understood by $DESTDIR/usr/bin/gdb (run on
the target system):
# gdb
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are welcome to change it and/or distribute
copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "i386--netbsdelf".
(gdb) help target
Connect to a target machine or process.
The first argument is the type or protocol of the target machine.
Remaining arguments are interpreted by the target protocol. For more
information on the arguments for a particular protocol, type
`help target ' followed by the protocol name.
List of target subcommands:
target async -- Use a remote computer via a serial line
target child -- Unix child process (started by the "run" command)
target core -- Use a core file as a target
target exec -- Use an executable file as a target
target extended-async -- Use a remote computer via a serial line
target extended-remote -- Use a remote computer via a serial line
target kvm -- Use a kernel virtual memory image as a target
target remote -- Use a remote computer via a serial line
Type "help target" followed by target subcommand name for
full documentation.
Command name abbreviations are allowed if unambiguous.
(gdb)
>Fix:
Unknown.
>Audit-Trail:
From: Jason Thorpe <thorpej@shagadelic.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/35597: cross-gdb does not grok NetBSD target kcore/kvm
Date: Mon, 16 Apr 2007 22:01:31 -0700
The issue is that "target kcore" / "target kvm" depend on the native
libkvm. Because we can't build a cross-targeted libkvm, we can't use
that functionality.
To fix this, gdb would need to be taught about the crash dump format
and how to parse the page tables in the crash dump to do the KVA ->
file offset mapping (basically, replace the dead-kernel functionality
that we get from libkvm), and do so in a cross-safe way.
-- thorpej
(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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.