From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15039 invoked by alias); 11 Oct 2007 19:02:02 -0000 Received: (qmail 14924 invoked by uid 22791); 11 Oct 2007 19:02:00 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 Oct 2007 19:01:56 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1C70C981F3; Thu, 11 Oct 2007 19:01:55 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id D89E3981F2; Thu, 11 Oct 2007 19:01:54 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1Ig3IA-0001NX-4B; Thu, 11 Oct 2007 15:01:54 -0400 Date: Thu, 11 Oct 2007 19:08:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc/rft] [1/3] Remove stabs target macros: VARIABLES_INSIDE_BLOCK Message-ID: <20071011190154.GA30810@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <20071005181214.GA5316@caradoc.them.org> <200710081134.l98BY4t2029484@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200710081134.l98BY4t2029484@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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: 2007-10/txt/msg00317.txt.bz2 On Mon, Oct 08, 2007 at 01:34:04PM +0200, Ulrich Weigand wrote: > Just removing it would certainly be fine with me; should we do that? I tested this patch with stabs on arm-eabi, just to be thorough. As expected it had no effect since I was using GCC. I've checked it in. -- Daniel Jacobowitz CodeSourcery 2007-10-11 Daniel Jacobowitz * dbxread.c (process_one_symbol): Remove VARIABLES_INSIDE_BLOCK checks. * config/arm/embed.mt, config/arm/linux.mt, config/arm/wince.mt: Do not set DEPRECATED_TM_FILE. * config/arm/tm-arm.h: Delete file. 2007-10-11 Daniel Jacobowitz * gdbint.texinfo (Target Conditionals): Remove VARIABLES_INSIDE_BLOCK. Index: dbxread.c =================================================================== RCS file: /cvs/src/src/gdb/dbxread.c,v retrieving revision 1.87 diff -u -p -r1.87 dbxread.c --- dbxread.c 21 Sep 2007 18:01:23 -0000 1.87 +++ dbxread.c 11 Oct 2007 18:55:50 -0000 @@ -2794,38 +2794,19 @@ process_one_symbol (int type, int desc, if (desc != new->depth) lbrac_mismatch_complaint (symnum); - /* Some compilers put the variable decls inside of an - LBRAC/RBRAC block. This macro should be nonzero if this is - true. DESC is N_DESC from the N_RBRAC symbol. GCC_P is true - if we've detected the GCC_COMPILED_SYMBOL or the - GCC2_COMPILED_SYMBOL. */ -#if !defined (VARIABLES_INSIDE_BLOCK) -#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) 0 -#endif - - /* Can only use new->locals as local symbols here if we're in - GCC or on a machine that puts them before the lbrack. */ - if (!VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation)) + if (local_symbols != NULL) { - if (local_symbols != NULL) - { - /* GCC development snapshots from March to December of - 2000 would output N_LSYM entries after N_LBRAC - entries. As a consequence, these symbols are simply - discarded. Complain if this is the case. Note that - there are some compilers which legitimately put local - symbols within an LBRAC/RBRAC block; this complaint - might also help sort out problems in which - VARIABLES_INSIDE_BLOCK is incorrectly defined. */ - complaint (&symfile_complaints, _("\ + /* GCC development snapshots from March to December of + 2000 would output N_LSYM entries after N_LBRAC + entries. As a consequence, these symbols are simply + discarded. Complain if this is the case. */ + complaint (&symfile_complaints, _("\ misplaced N_LBRAC entry; discarding local symbols which have \ no enclosing block")); - } - local_symbols = new->locals; } + local_symbols = new->locals; - if (context_stack_depth - > !VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation)) + if (context_stack_depth > 1) { /* This is not the outermost LBRAC...RBRAC pair in the function, its local symbols preceded it, and are the ones @@ -2858,9 +2839,6 @@ no enclosing block")); within_function = 0; } - if (VARIABLES_INSIDE_BLOCK (desc, processing_gcc_compilation)) - /* Now pop locals of block just finished. */ - local_symbols = new->locals; break; case N_FN: Index: config/arm/embed.mt =================================================================== RCS file: /cvs/src/src/gdb/config/arm/embed.mt,v retrieving revision 1.5 diff -u -p -r1.5 embed.mt --- config/arm/embed.mt 16 May 2007 15:31:12 -0000 1.5 +++ config/arm/embed.mt 11 Oct 2007 18:55:50 -0000 @@ -1,6 +1,5 @@ # Target: ARM embedded system TDEPFILES= arm-tdep.o -DEPRECATED_TM_FILE= tm-arm.h SIM_OBS = remote-sim.o SIM = ../sim/arm/libsim.a Index: config/arm/linux.mt =================================================================== RCS file: /cvs/src/src/gdb/config/arm/linux.mt,v retrieving revision 1.11 diff -u -p -r1.11 linux.mt --- config/arm/linux.mt 28 Nov 2006 21:41:02 -0000 1.11 +++ config/arm/linux.mt 11 Oct 2007 18:55:50 -0000 @@ -1,5 +1,4 @@ # Target: ARM based machine running GNU/Linux -DEPRECATED_TM_FILE= tm-arm.h TDEPFILES= arm-tdep.o arm-linux-tdep.o glibc-tdep.o solib.o \ solib-svr4.o solib-legacy.o symfile-mem.o \ corelow.o Index: config/arm/tm-arm.h =================================================================== RCS file: config/arm/tm-arm.h diff -N config/arm/tm-arm.h --- config/arm/tm-arm.h 23 Aug 2007 18:08:47 -0000 1.36 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ -/* Definitions to target GDB to ARM targets. - Copyright 1986, 1987, 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef TM_ARM_H -#define TM_ARM_H - -/* Specify that for the native compiler variables for a particular - lexical context are listed after the beginning LBRAC instead of - before in the executables list of symbols. */ -#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (!(gcc_p)) - -#endif /* TM_ARM_H */ Index: config/arm/wince.mt =================================================================== RCS file: /cvs/src/src/gdb/config/arm/wince.mt,v retrieving revision 1.5 diff -u -p -r1.5 wince.mt --- config/arm/wince.mt 31 Jul 2007 13:50:11 -0000 1.5 +++ config/arm/wince.mt 11 Oct 2007 18:55:50 -0000 @@ -1,4 +1,3 @@ # Target: ARM based machine running Windows CE (win32) -DEPRECATED_TM_FILE= tm-arm.h TDEPFILES= arm-tdep.o arm-wince-tdep.o corelow.o \ solib.o solib-target.o Index: doc/gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.267 diff -u -p -r1.267 gdbint.texinfo --- doc/gdbint.texinfo 1 Oct 2007 00:17:58 -0000 1.267 +++ doc/gdbint.texinfo 11 Oct 2007 18:55:51 -0000 @@ -4178,15 +4178,6 @@ This method has been deprecated in favou Convert a value of type @var{type} into the raw contents of a register. @xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}. -@item VARIABLES_INSIDE_BLOCK (@var{desc}, @var{gcc_p}) -@findex VARIABLES_INSIDE_BLOCK -For dbx-style debugging information, if the compiler puts variable -declarations inside LBRAC/RBRAC blocks, this should be defined to be -nonzero. @var{desc} is the value of @code{n_desc} from the -@code{N_RBRAC} symbol, and @var{gcc_p} is true if @value{GDBN} has noticed the -presence of either the @code{GCC_COMPILED_SYMBOL} or the -@code{GCC2_COMPILED_SYMBOL}. By default, this is 0. - @end table Motorola M68K target conditionals.