Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: ezannoni@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: [rfa/testsuite/stabs] weird.exp: skip hp
Date: Wed, 07 Jan 2004 21:31:00 -0000	[thread overview]
Message-ID: <20040107213133.4B8C34B35A@berman.michael-chastain.com> (raw)

This patch fixes weird.exp so that it skips properly on hp-ux.

The old code looked at the CC environment variable.  The new code looks
at hp_cc_compiler and hp_aCC_compiler.

This isn't perfect, because we really want to test for the HP assembler,
not the HP compiler.  If someone is using an HP compiler then of course
they are using the HP assembler.  But if someone is using gcc with the
HP assembler (which is not recommended on hp-ux), then the test script
is going to execute.

If I detect hp_cc_compiler or hp_aCC_compiler, I issue one UNSUPPORTED
message and skip the test script.

I also fixed the copyright years by adding years where patches were
committed to this file on cvs HEAD.  I could do this as a separate
patch if you want.

Tested on:

  native i686-pc-linux-gnu, gcc 2.95.3 3.3.2 HEAD, dwarf-2 and stabs+
  native hppa2.0w-hp-hpux11.11, hp ansi c

Okay to commit?

Michael C

2004-01-07  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.stabs/weird.exp: Use hp_cc_compiler and hp_aCC_compiler
	to test for hp-ux assembler.  Fix copyright years.

Index: gdb.stabs/weird.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.stabs/weird.exp,v
retrieving revision 1.6
diff -c -3 -p -r1.6 weird.exp
*** gdb.stabs/weird.exp	11 Sep 2003 19:09:46 -0000	1.6
--- gdb.stabs/weird.exp	7 Jan 2004 21:18:43 -0000
***************
*** 1,4 ****
! #   Copyright 1997, 1998, 1999 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,5 ----
! # Copyright 1997, 1998, 1999, 2001, 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
*************** if ![file isdirectory ${objdir}/${subdir
*** 33,38 ****
--- 34,57 ----
  set prms_id 0
  set bug_id 0
  
+ set testfile weird
+ set srcfile ${objdir}/${subdir}/weird.s
+ set binfile ${objdir}/${subdir}/weirdx.o
+ 
+ if { [ get_compiler_info "$binfile" ] } {
+     return -1
+ }
+ 
+ if { $hp_cc_compiler || $hp_aCC_compiler } {
+     # The native hp-ux assembler does not support stabs at all.
+     # If the compiler is native hp-ux, of course the assembler is too.
+     # But if someone builds gcc with the native assembler (not recommended)
+     # rather than the gnu assembler, then this logic will not suppress it.
+     # -- chastain 2004-01-07
+     unsupported "stabs with HP assembler"
+     continue
+ }
+ 
  proc do_tests {} {
  	global binfile
  	global gdb_prompt
*************** proc print_weird_var { var } {
*** 236,244 ****
  
  # Don't use gdb_load; it doesn't bitch if the loading produced some
  # error messages during symbol reading.
- set testfile weird
- set srcfile ${objdir}/${subdir}/weird.s
- set binfile ${objdir}/${subdir}/weirdx.o
  
  global target_os
  set sedscript ${srcdir}/${subdir}/aout.sed
--- 255,260 ----
*************** switch -glob ${target_triplet} {
*** 266,284 ****
      }
  }
  
- 
  # Hope this is a Unix box.
  set exec_output [remote_exec build "sed" "-f ${sedscript}" "${srcdir}/${subdir}/weird.def" "${srcfile}"]
  if { [lindex $exec_output 0] != 0 } {
      perror "Couldn't make test case. $exec_output"
      return -1
  }
- 
- # HP's assembler has no idea of what to do with .stab directives; detect the
- # use of HP compilers and escape from here.  (No doubt a better heuristic
- # could be devised.)
- 
- if { [ info exists CC ] && [ string first "/opt/ansic/bin/cc" "$CC" ] >= 0 } then { continue }
  
  if  { [gdb_compile "${srcfile}" "${binfile}" object ""] != "" } {
       gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
--- 282,293 ----


             reply	other threads:[~2004-01-07 21:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-07 21:31 Michael Elizabeth Chastain [this message]
2004-01-07 21:38 ` Elena Zannoni
2004-01-07 23:59 ` Andrew Cagney
2004-01-07 21:59 Michael Elizabeth Chastain
2004-01-08  0:40 Michael Elizabeth Chastain

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=20040107213133.4B8C34B35A@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.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