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]

[rfa/testsuite/java] add test for pr gdb/1322


Hi Anthony and other gdb folks,

This is a new test for pr gdb/1322, the java anonymous object file
dwarf2 dfe internal-error bug.

  http://sources.redhat.com/gdb/bugs/1322

I made up some code to get out of the gdb "write a core file (y or n)"
prompts.  If there is some standard way to do this, I am open to change.

The new test KFAILed on all configurations tested.

I tested this on native i686-pc-linux-gnu with dwarf-2 only (there is a
bug in the dejagnu machinery where it does not pass the requested debug
format to gcj so even when I ask for stabs+ I still get just "-g").  I
tested with gcj 3.2-7-rh, 3.3, gcc-3_3-branch, HEAD, and with
several versions of binutils.

Since this bug is not a regression from 5.3, I do not feel a need
to port the test to gdb 6.0.

OK to apply?

Michael C

2003-08-06  Michael Chastain  <mec@shout.net>

	* gdb.java/jmisc1.exp: Add test for pr gdb/1322.

Index: jmisc1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmisc1.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 jmisc1.exp
*** jmisc1.exp	29 Apr 2002 21:33:03 -0000	1.1
--- jmisc1.exp	6 Aug 2003 20:21:36 -0000
***************
*** 1,4 ****
! # Copyright 2002 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,4 ----
! # Copyright 2002, 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
*************** if ![set_lang_java] then {
*** 87,91 ****
--- 87,117 ----
  	-re "\\\$2 = \{length: 0\}\[\r\n\ \t]+$gdb_prompt $"                                                             { pass "p *args" }
  	-re ".*$gdb_prompt $"             { fail "p *args" }
  	timeout { fail "p *args (timeout)" ; return }
+     }
+ 
+     # The idea of running to 'exit' is that 'exit' is in a different
+     # objfile from the rest of the program (provided that program is
+     # linked normally with a shared libc).  That causes gdb to examine
+     # fresh objfiles.  There is nothing important about 'exit'
+     # semantics; it could be any symbol that is in a shared library.
+     # -- chastain 2003-08-06
+ 
+     gdb_test "break exit" ".*Breakpoint $decimal at .*"
+     gdb_test_multiple "continue" "continue to exit" {
+ 	-re ".*Breakpoint $decimal, .*exit.*$gdb_prompt $" {
+ 	    pass "continue to exit"
+ 	}
+ 	-re ".*internal-error: sect_index_text not initialized.*\\(y or n\\) " {
+ 	    # gdb choked on the "anonymous objfile" (probably).
+ 	    kfail "gdb/1322" "continue to exit"
+ 	    # get back to the gdb prompt
+ 	    gdb_test_multiple "no" "internal sync 1" {
+ 		-re ".*\\(y or n\\) " {
+ 		    gdb_test_multiple "no" "internal sync 2" {
+ 			-re ".*$gdb_prompt $" { ; }
+ 		    }
+ 		}
+ 	    }
+ 	}
      }
  }


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