This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch/testsuite/cp] kill supports_template_debugging


This patch removes the test suite symbol 'supports_template_debugging'.

This symbol was always defined if __cplusplus is defined, so it doesn't
actually say anything useful.  It's used in just one place,
gdb.cp/templates.exp, which tests it *after* trying to compile a C++ file
with template support.  Hey, if the compiler being tested can compile
templates.cc, then gdb ought to take a shot at debugging it!

Tested on native i686-pc-linux-gnu with gcc 2.95.3 and gcc 3.3.2,
dwarf-2 and stabs+.

I am committing this now.

Good-bye to one more bit of cruft we don't need.

Michael C

Index: gdb.cp/templates.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/templates.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 templates.exp
*** gdb.cp/templates.exp	25 Nov 2003 14:34:37 -0000	1.2
--- gdb.cp/templates.exp	2 Jan 2004 23:13:51 -0000
***************
*** 1,4 ****
! # Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003
  # Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
--- 1,4 ----
! # Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003, 2004
  # Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
*************** proc do_tests {} {
*** 197,203 ****
      global srcdir
      global binfile
      global gdb_prompt
-     global supports_template_debugging
  
      set prms_id 0
      set bug_id 0
--- 197,202 ----
*************** proc do_tests {} {
*** 208,218 ****
      gdb_start
      gdb_reinitialize_dir $srcdir/$subdir
      gdb_load $binfile
- 
-     if { !$supports_template_debugging } {
- 	warning "compiler lacks debugging info for templates; tests suppressed." 0
- 	return
-     }
  
      runto_main
  
--- 207,212 ----
Index: lib/compiler.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.cc,v
retrieving revision 1.3
diff -c -3 -p -r1.3 compiler.cc
*** lib/compiler.cc	17 Nov 2003 15:00:20 -0000	1.3
--- lib/compiler.cc	2 Jan 2004 23:13:51 -0000
***************
*** 1,6 ****
  /* This test file is part of GDB, the GNU debugger.
  
!    Copyright 1995, 1999, 2003 Free Software Foundation, Inc.
  
     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
--- 1,6 ----
  /* This test file is part of GDB, the GNU debugger.
  
!    Copyright 1995, 1999, 2003, 2004 Free Software Foundation, Inc.
  
     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
***************
*** 33,50 ****
     TODO:  It might be a good idea to add expect code that tests each
     definition made with 'set" to see if one already exists, and if so
     warn about conflicts if it is being set to something else.  */
- 
- #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
- set supports_template_debugging 1
- #else
- set supports_template_debugging 0
- #endif
- 
- #if defined(__cplusplus) 
- set supports_template_debugging 1
- #else
- set supports_template_debugging 0
- #endif
  
  #if defined (__GNUC__)
  set gcc_compiled __GNUC__
--- 33,38 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]