From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21959 invoked by alias); 15 Apr 2009 15:23:29 -0000 Received: (qmail 21938 invoked by uid 22791); 15 Apr 2009 15:23:28 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_22,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Apr 2009 15:23:22 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.14.3/8.13.8) with ESMTP id n3FFNKQ9155186; Wed, 15 Apr 2009 15:23:20 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n3FFNKKK2285700; Wed, 15 Apr 2009 17:23:20 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n3FFNJ68025902; Wed, 15 Apr 2009 17:23:19 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n3FFNIY9025877; Wed, 15 Apr 2009 17:23:18 +0200 Message-Id: <200904151523.n3FFNIY9025877@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 15 Apr 2009 17:23:18 +0200 Subject: Re: [RFC] GDB ARIndex Linux rule cleanup To: eliz@gnu.org Date: Wed, 15 Apr 2009 15:23:00 -0000 From: "Ulrich Weigand" Cc: muller@ics.u-strasbg.fr, brobecker@adacore.com, gdb-patches@sourceware.org, gdb@sourceware.org In-Reply-To: <831vrum1u5.fsf@gnu.org> from "Eli Zaretskii" at Apr 15, 2009 05:24:50 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00310.txt.bz2 Eli Zaretskii wrote: > I think GDB's "target" is always the OS kernel, not the OS itself. > > The distinction FSF asks for is between the GNU/Linux as a whole > system, which includes all the main applications and libraries, and > Linux as the bare-bones OS. GDB targets the latter, not the former. Huh? I'd say a large part of what makes up a GDB target is unrelated to the OS kernel: - Processor properties (register names/types/groups) - ABI elements (data types, function calling convention, stack unwinding, C++ ABI, platform-specific debug format details, ...) - Shared library support, thread support (those may depend on kernel details, but may also -in particular on Linux- depend on strictly user-space library-implemented details ...) If you were to write a program using a completely different user-space ABI, it might run just fine on the Linux kernel, but GDB configured for a -linux target would not really be able to successfully debug the program. It seems to me that configuring GDB for, say, the powerpc-linux target, has the effect of preparing GDB to debug programs on the GNU/Linux OS on the PowerPC platform, assuming the GNU/Linux ABI for the platform as well as the core GNU/Linux system libraries (libc, ld.so, libpthread) to be used, of course *in addition* to the Linux kernel. > > Compare for example the usage in linux-nat.c: > > > > /* Create a prototype generic GNU/Linux target. > > That's a mistake, IMO. There's no need for GNU here. This is common usage throughout the Linux target and native files. Even looking just at the very first lines of those files: [uweigand@blc4eb184639574 gdb]$ head -1 *-linux-tdep.c | grep Linux /* Target-dependent code for GNU/Linux on Alpha. /* Target-dependent code for GNU/Linux x86-64. /* GNU/Linux on ARM target support. /* Target-dependent code for GNU/Linux running on the Fujitsu FR-V, /* Target-dependent code for GNU/Linux running on PA-RISC, for GDB. /* Target-dependent code for GNU/Linux i386. /* Target-dependent code for GNU/Linux m32r. /* Target-dependent code for GNU/Linux on MIPS processors. /* Target-dependent code for GNU/Linux Super-H. /* Target-dependent code for GNU/Linux UltraSPARC. /* Target-dependent code for GNU/Linux SPARC. /* Target-dependent code for GNU/Linux on Xtensa processors. [uweigand@blc4eb184639574 gdb]$ head -1 *-linux-nat.c | grep Linux /* Low level Alpha GNU/Linux interface, for GDB when running native. /* Native-dependent code for GNU/Linux x86-64. /* GNU/Linux on ARM native support. /* Functions specific to running GDB native on HPPA running GNU/Linux. /* Native-dependent code for GNU/Linux i386. /* Native-dependent code for GNU/Linux m32r. /* Native-dependent code for GNU/Linux on MIPS processors. /* PPC GNU/Linux native support. /* Native-dependent code for GNU/Linux UltraSPARC. /* Native-dependent code for GNU/Linux SPARC. /* Xtensa GNU/Linux native support. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com