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]

Re: [RFA/c++ testsuite] Accept v2 demangler quirk


This patch is approved.

Michael C

===

2002-01-13  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.c++/demangle.exp: Accept slightly dubious v2 demangler result
	for slightly dubious v2 mangled string.

Index: demangle.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/demangle.exp,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 demangle.exp
--- demangle.exp	1999/09/09 00:00:27	1.1.1.4
+++ demangle.exp	2002/01/13 22:02:54
@@ -123,6 +123,8 @@ proc test_demangling_exact {test result}
 #
 
 proc test_gnu_style_demangling {} {
+    global gdb_prompt
+
     test_demangling "gnu: Abort__FP6EditoriPCc" \
 	"Abort\[(\]+Editor \[*\]+, int, (const char|char const) \[*\]+\[)\]+"
     test_demangling_exact "gnu: AddAlignment__9ivTSolverUiP12ivInteractorP7ivTGlue" "ivTSolver::AddAlignment(unsigned int, ivInteractor *, ivTGlue *)"
@@ -531,7 +533,22 @@ proc test_gnu_style_demangling {} {
     test_demangling_exact "gnu: foo__I_4000000000000000000000000000000000000000000000000000000000000000000000000" "Can't demangle \"foo__I_4000000000000000000000000000000000000000000000000000000000000000000000000\""
 
     ## 1999-04-19: "Fix from Dale Hawkins".  Shouldn't segfault.
-    test_demangling_exact "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" "Can't demangle \"__thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator\""
+    # Accept even a dubious demangling; the string is ambiguous.
+    send_gdb "maintenance demangle __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator\n"
+    gdb_expect {
+	-re "virtual function thunk \\(delta:-64\\) for CosNaming::_proxy_NamingContext::_0RL__list\\(unsigned long, _CORBA_Unbounded_Sequence<CosNaming::Binding> \\*\\&, CosNaming::BindingIterator \\*\\&\\)\r\n$gdb_prompt $" {
+		pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
+	}
+	-re ".*Can't demangle \"__thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator\"\r\n$gdb_prompt $" {
+		pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
+	}
+	-re ".*$gdb_prompt $" {
+		fail "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
+	}
+	timeout {
+		fail "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator (timeout)"
+	}
+    }
 }
 
 #


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