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]

More gdb.hp test improvements




There's three distinct changes in this patch.

	1. hwwatchbus.exp has been tweaked to allow the target to get
	either a SIGBUS or SIGSEGV on the invalid store into memory.

	2. Remove some useless chatter from so-thresh.exp

	3. Make bs14602 compilable with more than just HP's compiler.

Per Fernando's earlier message, I'm checking this in.

	
	* gdb.hp/gdb.base-hp/hwwatchbus.exp: Allow inferior to get either
	a SIGBUS or SIGSEGV.

	* gdb.hp/gdb.base-hp/so-thresh.exp: Remove useless send_user command.

	* gdb.hp/gdb.defects/bs14602.exp: Revamp slightly so that test
	can be compiled with either HP's compiler or GCC.

Index: gdb.base-hp/hwwatchbus.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 hwwatchbus.exp
*** hwwatchbus.exp	1999/08/10 01:54:31	1.1
--- hwwatchbus.exp	2001/12/21 00:04:51
*************** gdb_load ${binfile}
*** 54,60 ****
  
  
  # We ought to be able to set a hardware watchpoint, step, and
! # get a SIGBUS signal reported.
  #
  if ![runto_main] then {
    fail "can't run to main"
--- 54,60 ----
  
  
  # We ought to be able to set a hardware watchpoint, step, and
! # get a SIGBUS or SIGSEGV signal reported.
  #
  if ![runto_main] then {
    fail "can't run to main"
*************** gdb_expect {
*** 72,82 ****
  
  send_gdb "step\n"
  gdb_expect {
!   -re "Program received signal SIGBUS, Bus error.* in main 
.*${srcfile}:8.*$gdb_prompt $"\
!           {pass "see real SIGBUS when h/w watchpoint set"}
    -re "$gdb_prompt $"\
!           {fail "see real SIGBUS when h/w watchpoint set"}
!   timeout {fail "(timeout) see real SIGBUS when h/w watchpoint set"}
  }
  
  remote_exec build "mv ${binfile} ${binfile}.bak"
--- 72,82 ----
  
  send_gdb "step\n"
  gdb_expect {
!   -re "Program received signal (SIGBUS|SIGSEGV), (Bus error|Segmentation 
fault).* in main .*${srcfile}:8.*$gdb_prompt $"\
!           {pass "see real signal when h/w watchpoint set"}
    -re "$gdb_prompt $"\
!           {fail "see real signal when h/w watchpoint set"}
!   timeout {fail "(timeout) see real signal when h/w watchpoint set"}
  }
  
  remote_exec build "mv ${binfile} ${binfile}.bak"
Index: gdb.base-hp/so-thresh.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp,v
retrieving revision 1.1.344.1
diff -c -3 -p -r1.1.344.1 so-thresh.exp
*** so-thresh.exp	2001/12/20 22:28:57	1.1.344.1
--- so-thresh.exp	2001/12/21 00:04:51
*************** set timeout 60
*** 63,69 ****
  #
  # remote_exec build "sh -c \\\"cd ${objdir}/${subdir}\\; make -v -f 
${srcdir}/${subdir}/${testfile}.mk clean require_shlibs all 
SRCDIR=${srcdir}/${subdir} OBJDIR=${objdir}/${subdir}\\\""
  
- send_user "Making with '${srcdir}/${subdir}/${testfile}.sh $subdir ...\n"
  remote_exec build "${srcdir}/${subdir}/${testfile}.sh $subdir"
  
  # Only HP-UX (and any other platforms using SOM shared libraries, I
--- 63,68 ----
Index: gdb.defects/bs14602.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 bs14602.exp
*** bs14602.exp	1999/08/10 01:54:33	1.1
--- bs14602.exp	2001/12/21 00:04:51
*************** set prms_id 0
*** 17,31 ****
  set bug_id 0
  
  
- # set up appropriate compile option to recognize long double
- set ansi_option ""
- if [istarget "hppa*-*-*"] {
-     set ansi_option "-Ae"
- }
- 
  set testfile bs14602
  set srcfile ${testfile}.c
  set binfile ${objdir}/${subdir}/${testfile}
  
  if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable 
"debug {additional_flags=${ansi_option}}"] != "" } {
      perror "Couldn't compile ${srcfile}"
--- 17,38 ----
  set bug_id 0
  
  
  set testfile bs14602
  set srcfile ${testfile}.c
  set binfile ${objdir}/${subdir}/${testfile}
+ 
+ # Create and source the file that provides information about the compiler
+ # used to compile the test case.
+ if [get_compiler_info ${binfile}] {
+     return -1;
+ }
+ 
+ # set up appropriate compile option to recognize long double
+ if {$hp_aCC_compiler || $hp_cc_compiler} {
+     set ansi_option "-Ae"
+ } else {
+     set ansi_option ""
+ }
  
  if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable 
"debug {additional_flags=${ansi_option}}"] != "" } {
      perror "Couldn't compile ${srcfile}"




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