Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc/rft] [1/3] Remove stabs target macros: 	VARIABLES_INSIDE_BLOCK
Date: Thu, 11 Oct 2007 19:08:00 -0000	[thread overview]
Message-ID: <20071011190154.GA30810@caradoc.them.org> (raw)
In-Reply-To: <200710081134.l98BY4t2029484@d12av02.megacenter.de.ibm.com>

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  <dan@codesourcery.com>

	* 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  <dan@codesourcery.com>

	* 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 <http://www.gnu.org/licenses/>.  */
-
-#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.


  reply	other threads:[~2007-10-11 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 18:05 Ulrich Weigand
2007-10-05 18:12 ` Daniel Jacobowitz
2007-10-08 11:34   ` Ulrich Weigand
2007-10-11 19:08     ` Daniel Jacobowitz [this message]
2007-10-11 19:48       ` Ulrich Weigand
2007-10-06  7:07 ` Eli Zaretskii
2007-10-06  7:44   ` Eli Zaretskii
2007-10-08 11:09     ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071011190154.GA30810@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox