Update copyright year range in all GDB files.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / demangle.exp
1 # Copyright (C) 1992-2019 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # This file was written by Fred Fish. (fnf@cygnus.com)
17
18 if { [skip_cplus_tests] } { continue }
19
20 ### The demangling style we last sent to GDB.
21 set current_demangling_style none
22
23 ### Set GDB's current demangling style to STYLE. Subsequent calls to
24 ### test_demangle will include STYLE in the test name when reporting
25 ### passes and failures.
26 proc set_demangling_style {style} {
27 global gdb_prompt
28 global current_demangling_style
29
30 gdb_test_multiple "set demangle-style $style" \
31 "$style: set demangle-style" {
32 -re "set demangle-style $style\[\r\n\]+$gdb_prompt $" {
33 pass "$style: set demangle-style"
34 }
35 -re ".*$gdb_prompt $" {
36 fail "$style: set demangle-style"
37 error "set_demangling_style: set style"
38 }
39 timeout {
40 fail "$style: set demangle-style (timeout)"
41 error "set_demangling_style: set style"
42 }
43 }
44
45 gdb_test_multiple "show demangle-style" \
46 "$style: check demangling style" {
47 -re "The current C\[+\]+ demangling style is \"$style\".\r\n$gdb_prompt $" {
48 pass "$style: check demangling style"
49 }
50 -re ".*$gdb_prompt $" {
51 fail "$style: check demangling style"
52 error "set_demangling_style: check style"
53 }
54 timeout {
55 fail "$style: check demangling style (timeout)"
56 error "set_demangling_style: check style"
57 }
58 }
59
60 set current_demangling_style $style
61 }
62
63
64 ### Utility function for test_demangling and test_demangling_exact.
65 proc test_demangling_core {tester test result} {
66 global current_demangling_style
67
68 if {! [regexp {^([^ ]+): (.+)$} $test dummy style name]} {
69 error "bad test name passed to test_demangling"
70 }
71
72 if {[string compare $style $current_demangling_style]} {
73 with_test_prefix $test {
74 set_demangling_style $style
75 }
76 }
77
78 $tester "demangle $name" $result $test
79 }
80
81 ### Demangle an identifier, and check that the result matches a pattern.
82 ###
83 ### TEST should be of the form "STYLE: NAME", where STYLE is the name
84 ### of a demangling style (like "gnu" or "arm"), and NAME is a mangled
85 ### identifier to demangle. Pass when the result matches the regular
86 ### expression RESULT. Report passes and fails using TEST as the name
87 ### of the test.
88 ###
89 ### Why don't we just pass the STYLE and NAME as two separate
90 ### arguments, or let the style be a global variable? That would be
91 ### cleaner. However, doing it this way means that:
92 ###
93 ### 1) the name of the test, as recorded in the summary and log,
94 ### appears verbatim in the script, and
95 ###
96 ### 2) that test names are unique, even though we try to demangle the same
97 ### identifiers using several different mangling styles.
98 ###
99 ### This makes it a lot easier for people tracking down failures to
100 ### find the one they care about.
101
102 proc test_demangling {test result} {
103 test_demangling_core gdb_test $test $result
104 }
105
106 ### Like test_demangling, above, except that RESULT is not a regexp,
107 ### but a string that must match exactly.
108
109 proc test_demangling_exact {test result} {
110 test_demangling_core gdb_test_exact $test $result
111 }
112
113
114
115 #
116 # Test gnu style name demangling
117 #
118
119 proc test_gnu_style_demangling {} {
120 global gdb_prompt
121
122 test_demangling "gnu: Abort__FP6EditoriPCc" \
123 "Abort\[(\]+Editor \[*\]+, int, (const char|char const) \[*\]+\[)\]+"
124 test_demangling_exact "gnu: AddAlignment__9ivTSolverUiP12ivInteractorP7ivTGlue" "ivTSolver::AddAlignment(unsigned int, ivInteractor *, ivTGlue *)"
125 test_demangling "gnu: Append__15NameChooserViewPCc" \
126 "NameChooserView::Append\[(\]+(const char|char const) \[*\]+\[)\]+"
127 test_demangling_exact "gnu: ArrowheadIntersects__9ArrowLineP9ArrowheadR6BoxObjP7Graphic" "ArrowLine::ArrowheadIntersects(Arrowhead *, BoxObj &, Graphic *)"
128 test_demangling_exact "gnu: AtEnd__13ivRubberGroup" "ivRubberGroup::AtEnd(void)"
129 test_demangling_exact "gnu: BgFilter__9ivTSolverP12ivInteractor" "ivTSolver::BgFilter(ivInteractor *)"
130 test_demangling "gnu: BitPatterntoa__FRC10BitPatternccc" \
131 "BitPatterntoa\[(\]+(const BitPattern|BitPattern const) &, char, char, char\[)\]+"
132 test_demangling_exact "gnu: Check__6UArrayi" "UArray::Check(int)"
133 test_demangling_exact "gnu: CoreConstDecls__8TextCodeR7ostream" "TextCode::CoreConstDecls(ostream &)"
134 test_demangling_exact "gnu: Detach__8StateVarP12StateVarView" "StateVar::Detach(StateVarView *)"
135 test_demangling_exact "gnu: Done__9ComponentG8Iterator" "Component::Done(Iterator)"
136 test_demangling "gnu: DrawDestinationTransformedImage__FP7_XImageiiT0iiUlUiiiUiUlUlP4_XGCRC13ivTransformeriiii" \
137 "DrawDestinationTransformedImage\[(\]+_XImage \[*\]+, int, int, _XImage \[*\]+, int, int, unsigned long, unsigned int, int, int, unsigned int, unsigned long, unsigned long, _XGC \[*\]+, (const ivTransformer|ivTransformer const) &, int, int, int, int\[)\]+"
138
139 test_demangling "gnu: Edit__12StringEditorPCcii" \
140 "StringEditor::Edit\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
141 test_demangling_exact "gnu: Effect__11RelateManipR7ivEvent" "RelateManip::Effect(ivEvent &)"
142 test_demangling "gnu: FilterName__FPCc" \
143 "FilterName\[(\]+(const char|char const) \[*\]+\[)\]+"
144 test_demangling "gnu: Filter__6PSTextPCci" \
145 "PSText::Filter\[(\]+(const char|char const) \[*\]+, int\[)\]+"
146 test_demangling "gnu: FindColor__7CatalogPCciii" \
147 "Catalog::FindColor\[(\]+(const char|char const) \[*\]+, int, int, int\[)\]+"
148 test_demangling_exact "gnu: FindFixed__FRP4CNetP4CNet" "FindFixed(CNet *&, CNet *)"
149 test_demangling "gnu: FindFont__7CatalogPCcN21" \
150 "Catalog::FindFont\[(\]+(const char|char const) \[*\]+, (const char|char const) \[*\]+, (const char|char const) \[*\]+\[)\]+"
151 test_demangling_exact "gnu: Fix48_abort__FR8twolongs" "Fix48_abort(twolongs &)"
152 test_demangling_exact "gnu: GetBarInfo__15iv2_6_VScrollerP13ivPerspectiveRiT2" "iv2_6_VScroller::GetBarInfo(ivPerspective *, int &, int &)"
153 test_demangling_exact "gnu: GetBgColor__C9ivPainter" "ivPainter::GetBgColor(void) const"
154
155 test_demangling "gnu: Iisdouble__FPC6IntRep" \
156 "Iisdouble\[(\]+(const IntRep|IntRep const) \[*\]+\[)\]+"
157 test_demangling_exact "gnu: InsertBody__15H_PullrightMenuii" "H_PullrightMenu::InsertBody(int, int)"
158 test_demangling_exact "gnu: InsertCharacter__9TextManipc" "TextManip::InsertCharacter(char)"
159
160 test_demangling_exact "gnu: InsertToplevel__7ivWorldP12ivInteractorT1" "ivWorld::InsertToplevel(ivInteractor *, ivInteractor *)"
161 test_demangling_exact "gnu: InsertToplevel__7ivWorldP12ivInteractorT1iiUi" "ivWorld::InsertToplevel(ivInteractor *, ivInteractor *, int, int, unsigned int)"
162 test_demangling "gnu: IsADirectory__FPCcR4stat" \
163 "IsADirectory\[(\]+(const char|char const) \[*\]+, stat &\[)\]+"
164 test_demangling_exact "gnu: IsAGroup__FP11GraphicViewP11GraphicComp" "IsAGroup(GraphicView *, GraphicComp *)"
165 test_demangling_exact "gnu: IsA__10ButtonCodeUl" "ButtonCode::IsA(unsigned long)"
166
167 test_demangling_exact "gnu: ReadName__FR7istreamPc" "ReadName(istream &, char *)"
168 test_demangling_exact "gnu: Redraw__13StringBrowseriiii" "StringBrowser::Redraw(int, int, int, int)"
169 test_demangling_exact "gnu: Rotate__13ivTransformerf" "ivTransformer::Rotate(float)"
170 test_demangling_exact "gnu: Rotated__C13ivTransformerf" "ivTransformer::Rotated(float) const"
171 test_demangling_exact "gnu: Round__Ff" "Round(float)"
172
173 test_demangling_exact "gnu: SetExport__16MemberSharedNameUi" "MemberSharedName::SetExport(unsigned int)"
174 test_demangling_exact "gnu: Set__14ivControlState13ControlStatusUi" "ivControlState::Set(ControlStatus, unsigned int)"
175 test_demangling_exact "gnu: Set__5DFacePcii" "DFace::Set(char *, int, int)"
176
177 test_demangling_exact "gnu: VConvert__9ivTSolverP12ivInteractorRP8TElementT2" "ivTSolver::VConvert(ivInteractor *, TElement *&, TElement *&)"
178 test_demangling_exact "gnu: VConvert__9ivTSolverP7ivTGlueRP8TElement" "ivTSolver::VConvert(ivTGlue *, TElement *&)"
179 test_demangling_exact "gnu: VOrder__9ivTSolverUiRP12ivInteractorT2" "ivTSolver::VOrder(unsigned int, ivInteractor *&, ivInteractor *&)"
180 test_demangling "gnu: Valid__7CatalogPCcRP4Tool" \
181 "Catalog::Valid\[(\]+(const char|char const) \[*\]+, Tool \[*\]+&\[)\]+"
182 test_demangling_exact "gnu: _10PageButton\$__both" "PageButton::__both"
183 test_demangling_exact "gnu: _3RNG\$singleMantissa" "RNG::singleMantissa"
184 test_demangling_exact "gnu: _5IComp\$_release" "IComp::_release"
185 test_demangling_exact "gnu: _\$_10BitmapComp" "BitmapComp::~BitmapComp(void)"
186
187 test_demangling_exact "gnu: _\$_9__io_defs" "__io_defs::~__io_defs(void)"
188 test_demangling_exact "gnu: _\$_Q23foo3bar" "foo::bar::~bar(void)"
189 test_demangling_exact "gnu: _\$_Q33foo3bar4bell" "foo::bar::bell::~bell(void)"
190 test_demangling_exact "gnu: __10ivTelltaleiP7ivGlyph" "ivTelltale::ivTelltale(int, ivGlyph *)"
191 test_demangling_exact "gnu: __10ivViewportiP12ivInteractorUi" "ivViewport::ivViewport(int, ivInteractor *, unsigned int)"
192 test_demangling_exact "gnu: __10ostrstream" "ostrstream::ostrstream(void)"
193 test_demangling_exact "gnu: __10ostrstreamPcii" "ostrstream::ostrstream(char *, int, int)"
194 test_demangling "gnu: __11BasicDialogiPCcP13ivButtonStateN22Ui" \
195 "BasicDialog::BasicDialog\[(\]+int, (const char|char const) \[*\]+, ivButtonState \[*\]+, (const char|char const) \[*\]+, (const char|char const) \[*\]+, unsigned int\[)\]+"
196 test_demangling_exact "gnu: __11BitmapTablei" "BitmapTable::BitmapTable(int)"
197 test_demangling_exact "gnu: __12ViewportCodeP12ViewportComp" "ViewportCode::ViewportCode(ViewportComp *)"
198 test_demangling "gnu: __12iv2_6_BorderiPCci" \
199 "iv2_6_Border::iv2_6_Border\[(\]+int, (const char|char const) \[*\]+, int\[)\]+"
200 test_demangling_exact "gnu: __12iv2_6_Borderii" "iv2_6_Border::iv2_6_Border(int, int)"
201 test_demangling "gnu: __12ivBackgroundiP7ivGlyphPC7ivColor" \
202 "ivBackground::ivBackground\[(\]+int, ivGlyph \[*\]+, (const ivColor|ivColor const) \[*\]+\[)\]+"
203 test_demangling_exact "gnu: __12ivBreak_Listl" "ivBreak_List::ivBreak_List(long)"
204 test_demangling "gnu: __14TextInteractoriPCcUi" \
205 "TextInteractor::TextInteractor\[(\]+int, (const char|char const) \[*\]+, unsigned int\[)\]+"
206 test_demangling_exact "gnu: __14iv2_6_MenuItemiP12ivInteractor" "iv2_6_MenuItem::iv2_6_MenuItem(int, ivInteractor *)"
207 test_demangling "gnu: __14iv2_6_MenuItemiPCcP12ivInteractor" \
208 "iv2_6_MenuItem::iv2_6_MenuItem\[(\]+int, (const char|char const) \[*\]+, ivInteractor \[*\]+\[)\]+"
209
210 test_demangling_exact "gnu: __20DisplayList_IteratorR11DisplayList" "DisplayList_Iterator::DisplayList_Iterator(DisplayList &)"
211 test_demangling_exact "gnu: __3fooRT0" "foo::foo(foo &)"
212 test_demangling_exact "gnu: __3fooiN31" "foo::foo(int, int, int, int)"
213 test_demangling "gnu: __3fooiPCc" \
214 "foo::foo\[(\]+int, (const char|char const) \[*\]+\[)\]+"
215 test_demangling_exact "gnu: __3fooiRT0iT2iT2" "foo::foo(int, foo &, int, foo &, int, foo &)"
216 test_demangling "gnu: __6GetOptiPPcPCc" \
217 "GetOpt::GetOpt\[(\]+int, char \[*\]+\[*\]+, (const char|char const) \[*\]+\[)\]+"
218 test_demangling_exact "gnu: __6KeyMapPT0" "KeyMap::KeyMap(KeyMap *)"
219 test_demangling "gnu: __7ivWorldPCcRiPPcPC12ivOptionDescPC14ivPropertyData" \
220 "ivWorld::ivWorld\[(\]+(const char|char const) \[*\]+, int &, char \[*\]+\[*\]+, (const ivOptionDesc|ivOptionDesc const) \[*\]+, (const ivPropertyData|ivPropertyData const) \[*\]+\[)\]+"
221 test_demangling "gnu: __7procbufPCci" \
222 "procbuf::procbuf\[(\]+(const char|char const) \[*\]+, int\[)\]+"
223 test_demangling_exact "gnu: __8ArrowCmdP6EditorUiUi" "ArrowCmd::ArrowCmd(Editor *, unsigned int, unsigned int)"
224
225 test_demangling_exact "gnu: __9F_EllipseiiiiP7Graphic" "F_Ellipse::F_Ellipse(int, int, int, int, Graphic *)"
226 test_demangling_exact "gnu: __9FrameDataP9FrameCompi" "FrameData::FrameData(FrameComp *, int)"
227 test_demangling_exact "gnu: __9HVGraphicP9CanvasVarP7Graphic" "HVGraphic::HVGraphic(CanvasVar *, Graphic *)"
228 test_demangling_exact "gnu: __Q23foo3bar" "foo::bar::bar(void)"
229 test_demangling_exact "gnu: __Q33foo3bar4bell" "foo::bar::bell::bell(void)"
230 test_demangling_exact "gnu: __aa__3fooRT0" "foo::operator&&(foo &)"
231 test_demangling_exact "gnu: __aad__3fooRT0" "foo::operator&=(foo &)"
232 test_demangling_exact "gnu: __ad__3fooRT0" "foo::operator&(foo &)"
233 test_demangling_exact "gnu: __adv__3fooRT0" "foo::operator/=(foo &)"
234 test_demangling_exact "gnu: __aer__3fooRT0" "foo::operator^=(foo &)"
235 test_demangling_exact "gnu: __als__3fooRT0" "foo::operator<<=(foo &)"
236 test_demangling_exact "gnu: __amd__3fooRT0" "foo::operator%=(foo &)"
237 test_demangling_exact "gnu: __ami__3fooRT0" "foo::operator-=(foo &)"
238 test_demangling_exact "gnu: __aml__3FixRT0" "Fix::operator*=(Fix &)"
239 test_demangling_exact "gnu: __aml__5Fix16i" "Fix16::operator*=(int)"
240 test_demangling_exact "gnu: __aml__5Fix32RT0" "Fix32::operator*=(Fix32 &)"
241 test_demangling_exact "gnu: __aor__3fooRT0" "foo::operator|=(foo &)"
242 test_demangling_exact "gnu: __apl__3fooRT0" "foo::operator+=(foo &)"
243 test_demangling_exact "gnu: __ars__3fooRT0" "foo::operator>>=(foo &)"
244
245 test_demangling_exact "gnu: __as__3fooRT0" "foo::operator=(foo &)"
246 test_demangling_exact "gnu: __cl__3fooRT0" "foo::operator()(foo &)"
247 test_demangling_exact "gnu: __cl__6Normal" "Normal::operator()(void)"
248 test_demangling_exact "gnu: __cl__6Stringii" "String::operator()(int, int)"
249 test_demangling_exact "gnu: __cm__3fooRT0" "foo::operator, (foo &)"
250 test_demangling_exact "gnu: __co__3foo" "foo::operator~(void)"
251 test_demangling_exact "gnu: __dl__3fooPv" "foo::operator delete(void *)"
252 test_demangling_exact "gnu: __dv__3fooRT0" "foo::operator/(foo &)"
253 test_demangling_exact "gnu: __eq__3fooRT0" "foo::operator==(foo &)"
254 test_demangling_exact "gnu: __er__3fooRT0" "foo::operator^(foo &)"
255 test_demangling_exact "gnu: __ge__3fooRT0" "foo::operator>=(foo &)"
256 test_demangling_exact "gnu: __gt__3fooRT0" "foo::operator>(foo &)"
257 test_demangling_exact "gnu: __le__3fooRT0" "foo::operator<=(foo &)"
258 test_demangling_exact "gnu: __ls__3fooRT0" "foo::operator<<(foo &)"
259 test_demangling_exact "gnu: __ls__FR7ostreamPFR3ios_R3ios" "operator<<(ostream &, ios &(*)(ios &))"
260 test_demangling_exact "gnu: __ls__FR7ostreamR3Fix" "operator<<(ostream &, Fix &)"
261 test_demangling_exact "gnu: __lt__3fooRT0" "foo::operator<(foo &)"
262 test_demangling_exact "gnu: __md__3fooRT0" "foo::operator%(foo &)"
263 test_demangling_exact "gnu: __mi__3fooRT0" "foo::operator-(foo &)"
264 test_demangling_exact "gnu: __ml__3fooRT0" "foo::operator*(foo &)"
265 test_demangling_exact "gnu: __mm__3fooi" "foo::operator--(int)"
266
267 test_demangling_exact "gnu: __ne__3fooRT0" "foo::operator!=(foo &)"
268 test_demangling "gnu: __ne__FRC7ComplexT0" \
269 "operator!=\[(\]+(const Complex|Complex const) &, (const Complex|Complex const) &\[)\]+"
270 test_demangling "gnu: __ne__FRC7Complexd" \
271 "operator!=\[(\]+(const Complex|Complex const) &, double\[)\]+"
272 test_demangling "gnu: __ne__FRC9SubStringRC6String" \
273 "operator!=\[(\]+(const SubString|SubString const) &, (const String|String const) &\[)\]+"
274 test_demangling_exact "gnu: __nt__3foo" "foo::operator!(void)"
275 test_demangling_exact "gnu: __nw__3fooi" "foo::operator new(int)"
276 test_demangling_exact "gnu: __oo__3fooRT0" "foo::operator||(foo &)"
277 test_demangling_exact "gnu: __opPc__3foo" "foo::operator char *(void)"
278 test_demangling_exact "gnu: __opi__3foo" "foo::operator int(void)"
279 test_demangling_exact "gnu: __or__3fooRT0" "foo::operator|(foo &)"
280 test_demangling_exact "gnu: __pl__3fooRT0" "foo::operator+(foo &)"
281 test_demangling_exact "gnu: __pp__3fooi" "foo::operator++(int)"
282 test_demangling_exact "gnu: __rf__3foo" "foo::operator->(void)"
283 test_demangling_exact "gnu: __rm__3fooRT0" "foo::operator->*(foo &)"
284 test_demangling_exact "gnu: __rs__3fooRT0" "foo::operator>>(foo &)"
285 test_demangling "gnu: __vc__3fooRT0" "foo::operator\\\[\\\]\\(foo &\\)"
286 test_demangling "gnu: _gsub__6StringRC5RegexPCci" \
287 "String::_gsub\[(\]+(const Regex|Regex const) &, (const char|char const) \[*\]+, int\[)\]+"
288 test_demangling_exact "gnu: _new_Fix__FUs" "_new_Fix(unsigned short)"
289
290 # gcc 2.4.5 (and earlier) style virtual tables. We want to continue to
291 # correctly demangle these even if newer compilers use a different form.
292 test_demangling_exact "gnu: _vt.foo" "foo virtual table"
293 test_demangling_exact "gnu: _vt.foo.bar" "foo::bar virtual table"
294 test_demangling_exact "gnu: _vt\$foo" "foo virtual table"
295 test_demangling_exact "gnu: _vt\$foo\$bar" "foo::bar virtual table"
296
297 test_demangling_exact "gnu: append__7ivGlyphPT0" "ivGlyph::append(ivGlyph *)"
298 test_demangling "gnu: arg__FRC7Complex" \
299 "arg\[(\]+(const Complex|Complex const) &\[)\]+"
300 test_demangling_exact "gnu: clearok__FP7_win_sti" "clearok(_win_st *, int)"
301
302 test_demangling_exact "gnu: complexfunc2__FPFPc_i" "complexfunc2(int (*)(char *))"
303 test_demangling_exact "gnu: complexfunc3__FPFPFPl_s_i" "complexfunc3(int (*)(short (*)(long *)))"
304 test_demangling_exact "gnu: complexfunc4__FPFPFPc_s_i" "complexfunc4(int (*)(short (*)(char *)))"
305 test_demangling_exact "gnu: complexfunc5__FPFPc_PFl_i" "complexfunc5(int (*(*)(char *))(long))"
306 test_demangling_exact "gnu: complexfunc6__FPFPi_PFl_i" "complexfunc6(int (*(*)(int *))(long))"
307 test_demangling_exact "gnu: complexfunc7__FPFPFPc_i_PFl_i" "complexfunc7(int (*(*)(int (*)(char *)))(long))"
308 test_demangling "gnu: contains__C9BitStringRC10BitPattern" \
309 "BitString::contains\[(\]+(const BitPattern|BitPattern const) &\[)\]+ const"
310 test_demangling "gnu: contains__C9BitStringRC12BitSubStringi" \
311 "BitString::contains\[(\]+(const BitSubString|BitSubString const) &, int\[)\]+ const"
312 test_demangling "gnu: contains__C9BitStringRT0" \
313 "BitString::contains\[(\]+(const BitString|BitString const) &\[)\]+ const"
314 test_demangling "gnu: div__FPC6IntRepT0P6IntRep" \
315 "div\[(\]+(const IntRep|IntRep const) \[*\]+, (const IntRep|IntRep const) \[*\]+, IntRep \[*\]+\[)\]+"
316 test_demangling "gnu: div__FPC6IntReplP6IntRep" \
317 "div\[(\]+(const IntRep|IntRep const) \[*\]+, long, IntRep \[*\]+\[)\]+"
318 test_demangling "gnu: div__FRC8RationalT0R8Rational" \
319 "div\[(\]+(const Rational|Rational const) &, (const Rational|Rational const) &, Rational &\[)\]+"
320 test_demangling "gnu: divide__FRC7IntegerT0R7IntegerT2" \
321 "divide\[(\]+(const Integer|Integer const) &, (const Integer|Integer const) &, Integer &, Integer &\[)\]+"
322 test_demangling "gnu: divide__FRC7IntegerlR7IntegerRl" \
323 "divide\[(\]+(const Integer|Integer const) &, long, Integer &, long &\[)\]+"
324 test_demangling "gnu: enable__14DocumentViewerPCcUi" \
325 "DocumentViewer::enable\[(\]+(const char|char const) \[*\]+, unsigned int\[)\]+"
326
327 test_demangling_exact "gnu: foo__FiN30" "foo(int, int, int, int)"
328 test_demangling_exact "gnu: foo__FiR3fooiT1iT1" "foo(int, foo &, int, foo &, int, foo &)"
329 test_demangling_exact "gnu: foo___3barl" "bar::foo_(long)"
330 test_demangling_exact "gnu: insert__15ivClippingStacklRP8_XRegion" "ivClippingStack::insert(long, _XRegion *&)"
331 test_demangling_exact "gnu: insert__16ChooserInfo_ListlR11ChooserInfo" "ChooserInfo_List::insert(long, ChooserInfo &)"
332 test_demangling_exact "gnu: insert__17FontFamilyRepListlRP15ivFontFamilyRep" "FontFamilyRepList::insert(long, ivFontFamilyRep *&)"
333 test_demangling_exact "gnu: leaveok__FP7_win_stc" "leaveok(_win_st *, char)"
334 test_demangling_exact "gnu: left_mover__C7ivMFKitP12ivAdjustableP7ivStyle" "ivMFKit::left_mover(ivAdjustable *, ivStyle *) const"
335 test_demangling "gnu: matches__C9BitStringRC10BitPatterni" \
336 "BitString::matches\[(\]+(const BitPattern|BitPattern const) &, int\[)\]+ const"
337 test_demangling "gnu: matches__C9SubStringRC5Regex" \
338 "SubString::matches\[(\]+(const Regex|Regex const) &\[)\]+ const"
339
340 test_demangling_exact "gnu: overload1arg__FSc" "overload1arg(signed char)"
341 test_demangling_exact "gnu: overload1arg__FUc" "overload1arg(unsigned char)"
342 test_demangling_exact "gnu: overload1arg__FUi" "overload1arg(unsigned int)"
343 test_demangling_exact "gnu: overload1arg__FUl" "overload1arg(unsigned long)"
344 test_demangling_exact "gnu: overload1arg__FUs" "overload1arg(unsigned short)"
345 test_demangling_exact "gnu: overload1arg__Fc" "overload1arg(char)"
346 test_demangling_exact "gnu: overload1arg__Fd" "overload1arg(double)"
347 test_demangling_exact "gnu: overload1arg__Ff" "overload1arg(float)"
348 test_demangling_exact "gnu: overload1arg__Fi" "overload1arg(int)"
349 test_demangling_exact "gnu: overload1arg__Fl" "overload1arg(long)"
350 test_demangling_exact "gnu: overload1arg__Fs" "overload1arg(short)"
351 test_demangling_exact "gnu: overload1arg__Fv" "overload1arg(void)"
352 test_demangling_exact "gnu: overloadargs__Fi" "overloadargs(int)"
353 test_demangling_exact "gnu: overloadargs__Fii" "overloadargs(int, int)"
354 test_demangling_exact "gnu: overloadargs__Fiii" "overloadargs(int, int, int)"
355 test_demangling_exact "gnu: overloadargs__Fiiii" "overloadargs(int, int, int, int)"
356
357 test_demangling_exact "gnu: overloadargs__Fiiiii" "overloadargs(int, int, int, int, int)"
358 test_demangling_exact "gnu: overloadargs__Fiiiiii" "overloadargs(int, int, int, int, int, int)"
359 test_demangling_exact "gnu: overloadargs__Fiiiiiii" "overloadargs(int, int, int, int, int, int, int)"
360 test_demangling_exact "gnu: overloadargs__Fiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int)"
361 test_demangling_exact "gnu: overloadargs__Fiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int)"
362 test_demangling_exact "gnu: overloadargs__Fiiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int, int)"
363 test_demangling_exact "gnu: overloadargs__Fiiiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int, int, int)"
364 test_demangling "gnu: pick__13ivCompositionP8ivCanvasRC12ivAllocationiR5ivHit" \
365 "ivComposition::pick\[(\]+ivCanvas \[*\]+, (const ivAllocation|ivAllocation const) &, int, ivHit &\[)\]+"
366 test_demangling "gnu: pointer__C11ivHScrollerRC7ivEventRC12ivAllocation" \
367 "ivHScroller::pointer\[(\]+(const ivEvent|ivEvent const) &, (const ivAllocation|ivAllocation const) &\[)\]+ const"
368 test_demangling_exact "gnu: poke__8ivRasterUlUlffff" "ivRaster::poke(unsigned long, unsigned long, float, float, float, float)"
369 test_demangling_exact "gnu: polar__Fdd" "polar(double, double)"
370 test_demangling "gnu: read__10osStdInputRPCc" \
371 "osStdInput::read\[(\]+(const char|char const) \[*\]+&\[)\]+"
372
373 test_demangling_exact "gnu: scale__13ivTransformerff" "ivTransformer::scale(float, float)"
374 test_demangling "gnu: scanw__12CursesWindowPCce" \
375 "CursesWindow::scanw\[(\]+(const char|char const) \[*\]+,...\[)\]+"
376 test_demangling "gnu: scmp__FPCcT0" \
377 "scmp\[(\]+(const char|char const) \[*\]+, (const char|char const) \[*\]+\[)\]+"
378 test_demangling_exact "gnu: sgetn__7filebufPci" "filebuf::sgetn(char *, int)"
379 test_demangling_exact "gnu: shift__FP5_FrepiT0" "shift(_Frep *, int, _Frep *)"
380 test_demangling_exact "gnu: test__C6BitSeti" "BitSet::test(int) const"
381 test_demangling_exact "gnu: test__C6BitSetii" "BitSet::test(int, int) const"
382 test_demangling "gnu: testbit__FRC7Integerl" \
383 "testbit\[(\]+(const Integer|Integer const) &, long\[)\]+"
384 test_demangling_exact "gnu: text_source__8Documentl" "Document::text_source(long)"
385 test_demangling_exact "gnu: variance__6Erlangd" "Erlang::variance(double)"
386 test_demangling "gnu: vform__8iostreamPCcPc" \
387 "iostream::vform\[(\]+(const char|char const) \[*\]+, char \[*\]+\[)\]+"
388 test_demangling_exact "gnu: view__14DocumentViewerP8ItemViewP11TabularItem" "DocumentViewer::view(ItemView *, TabularItem *)"
389 test_demangling_exact "gnu: xy_extents__11ivExtensionffff" "ivExtension::xy_extents(float, float, float, float)"
390 test_demangling_exact "gnu: zero__8osMemoryPvUi" "osMemory::zero(void *, unsigned int)"
391 test_demangling_exact "gnu: _2T4\$N" "T4::N"
392 test_demangling_exact "gnu: _Q22T42t1\$N" "T4::t1::N"
393 test_demangling_exact "gnu: get__2T1" "T1::get(void)"
394 test_demangling_exact "gnu: get__Q22T11a" "T1::a::get(void)"
395 test_demangling_exact "gnu: get__Q32T11a1b" "T1::a::b::get(void)"
396 test_demangling_exact "gnu: get__Q42T11a1b1c" "T1::a::b::c::get(void)"
397 test_demangling_exact "gnu: get__Q52T11a1b1c1d" "T1::a::b::c::d::get(void)"
398 test_demangling_exact "gnu: put__2T1i" "T1::put(int)"
399 test_demangling_exact "gnu: put__Q22T11ai" "T1::a::put(int)"
400 test_demangling_exact "gnu: put__Q32T11a1bi" "T1::a::b::put(int)"
401 test_demangling_exact "gnu: put__Q42T11a1b1ci" "T1::a::b::c::put(int)"
402 test_demangling_exact "gnu: put__Q52T11a1b1c1di" "T1::a::b::c::d::put(int)"
403
404 test_demangling_exact "gnu: bar__3fooPv" "foo::bar(void *)"
405 test_demangling "gnu: bar__3fooPCv" \
406 "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+"
407 test_demangling_exact "gnu: bar__C3fooPv" "foo::bar(void *) const"
408 test_demangling "gnu: bar__C3fooPCv" \
409 "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+ const"
410 test_demangling_exact "gnu: __eq__3fooRT0" "foo::operator==(foo &)"
411 test_demangling "gnu: __eq__3fooRC3foo" \
412 "foo::operator==\[(\]+(const foo|foo const) &\[)\]+"
413 test_demangling_exact "gnu: __eq__C3fooR3foo" "foo::operator==(foo &) const"
414 test_demangling "gnu: __eq__C3fooRT0" \
415 "foo::operator==\[(\]+(const foo|foo const) &\[)\]+ const"
416
417 test_demangling_exact "gnu: elem__t6vector1Zdi" "vector<double>::elem(int)"
418 test_demangling_exact "gnu: elem__t6vector1Zii" "vector<int>::elem(int)"
419 test_demangling_exact "gnu: __t6vector1Zdi" "vector<double>::vector(int)"
420 test_demangling_exact "gnu: __t6vector1Zii" "vector<int>::vector(int)"
421 test_demangling_exact "gnu: _\$_t6vector1Zdi" "vector<double>::~vector(int)"
422 test_demangling_exact "gnu: _\$_t6vector1Zii" "vector<int>::~vector(int)"
423
424 test_demangling_exact "gnu: __nw__t2T11ZcUi" "T1<char>::operator new(unsigned int)"
425 test_demangling_exact "gnu: __nw__t2T11Z1tUi" "T1<t>::operator new(unsigned int)"
426 test_demangling_exact "gnu: __dl__t2T11ZcPv" "T1<char>::operator delete(void *)"
427 test_demangling_exact "gnu: __dl__t2T11Z1tPv" "T1<t>::operator delete(void *)"
428 test_demangling_exact "gnu: __t2T11Zci" "T1<char>::T1(int)"
429 test_demangling_exact "gnu: __t2T11Zc" "T1<char>::T1(void)"
430 test_demangling_exact "gnu: __t2T11Z1ti" "T1<t>::T1(int)"
431 test_demangling_exact "gnu: __t2T11Z1t" "T1<t>::T1(void)"
432
433 test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3Pix" \
434 "List<VHDLEntity>::Pix::Pix(void)"
435
436 test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3PixPQ2t4List1Z10VHDLEntity7element" \
437 "List<VHDLEntity>::Pix::Pix(List<VHDLEntity>::element *)"
438
439 test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3PixRCQ2t4List1Z10VHDLEntity3Pix" \
440 "List<VHDLEntity>::Pix::Pix(List<VHDLEntity>::Pix const &)"
441
442 test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementRC10VHDLEntityPT0" \
443 "List<VHDLEntity>::element::element(VHDLEntity const &, List<VHDLEntity>::element *)"
444
445 test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementRCQ2t4List1Z10VHDLEntity7element" \
446 "List<VHDLEntity>::element::element(List<VHDLEntity>::element const &)"
447
448 test_demangling_exact "gnu: __cl__C11VHDLLibraryGt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
449 "VHDLLibrary::operator()(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >) const"
450
451 test_demangling_exact "gnu: __cl__Ct4List1Z10VHDLEntityRCQ2t4List1Z10VHDLEntity3Pix" \
452 "List<VHDLEntity>::operator()(List<VHDLEntity>::Pix const &) const"
453
454 test_demangling_exact "gnu: __ne__FPvRCQ2t4List1Z10VHDLEntity3Pix" \
455 "operator!=(void *, List<VHDLEntity>::Pix const &)"
456
457 test_demangling_exact "gnu: __ne__FPvRCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
458 "operator!=(void *, PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > const &)"
459
460 test_demangling_exact "gnu: __t4List1Z10VHDLEntityRCt4List1Z10VHDLEntity" \
461 "List<VHDLEntity>::List(List<VHDLEntity> const &)"
462
463 test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
464 "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(void)"
465
466 test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntityP14VHDLLibraryRepGQ2t4List1Z10VHDLEntity3Pix" \
467 "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(VHDLLibraryRep *, List<VHDLEntity>::Pix)"
468
469 test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntityRCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
470 "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > const &)"
471
472 test_demangling_exact "gnu: nextE__C11VHDLLibraryRt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
473 "VHDLLibrary::nextE(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > &) const"
474
475 test_demangling_exact "gnu: next__Ct4List1Z10VHDLEntityRQ2t4List1Z10VHDLEntity3Pix" \
476 "List<VHDLEntity>::next(List<VHDLEntity>::Pix &) const"
477
478 test_demangling_exact "gnu: _GLOBAL_\$D\$set" "global destructors keyed to set"
479
480 test_demangling_exact "gnu: _GLOBAL_\$I\$set" "global constructors keyed to set"
481
482 test_demangling_exact "gnu: __as__t5ListS1ZUiRCt5ListS1ZUi" \
483 "ListS<unsigned int>::operator=(ListS<unsigned int> const &)"
484
485 test_demangling_exact "gnu: __cl__Ct5ListS1ZUiRCQ2t5ListS1ZUi3Vix" \
486 "ListS<unsigned int>::operator()(ListS<unsigned int>::Vix const &) const"
487
488 test_demangling_exact "gnu: __cl__Ct5SetLS1ZUiRCQ2t5SetLS1ZUi3Vix" \
489 "SetLS<unsigned int>::operator()(SetLS<unsigned int>::Vix const &) const"
490
491 test_demangling_exact "gnu: __t10ListS_link1ZUiRCUiPT0" \
492 "ListS_link<unsigned int>::ListS_link(unsigned int const &, ListS_link<unsigned int> *)"
493
494 test_demangling_exact "gnu: __t10ListS_link1ZUiRCt10ListS_link1ZUi" \
495 "ListS_link<unsigned int>::ListS_link(ListS_link<unsigned int> const &)"
496
497 test_demangling_exact "gnu: __t5ListS1ZUiRCt5ListS1ZUi" \
498 "ListS<unsigned int>::ListS(ListS<unsigned int> const &)"
499
500 test_demangling_exact "gnu: next__Ct5ListS1ZUiRQ2t5ListS1ZUi3Vix" \
501 "ListS<unsigned int>::next(ListS<unsigned int>::Vix &) const"
502
503 test_demangling_exact "gnu: __ne__FPvRCQ2t5SetLS1ZUi3Vix" \
504 "operator!=(void *, SetLS<unsigned int>::Vix const &)"
505 test_demangling_exact "gnu: __t8ListElem1Z5LabelRt4List1Z5Label" \
506 "ListElem<Label>::ListElem(List<Label> &)"
507 test_demangling_exact "gnu: __t8BDDHookV1ZPcRCPc" \
508 "BDDHookV<char *>::BDDHookV(char *const &)"
509
510 test_demangling_exact "gnu: _vt\$t8BDDHookV1ZPc" "BDDHookV<char *> virtual table"
511
512 test_demangling_exact "gnu: __ne__FPvRCQ211BDDFunction4VixB" \
513 "operator!=(void *, BDDFunction::VixB const &)"
514 test_demangling_exact "gnu: __eq__FPvRCQ211BDDFunction4VixB" \
515 "operator==(void *, BDDFunction::VixB const &)"
516
517 test_demangling_exact "gnu: relativeId__CQ36T_phi210T_preserve8FPC_nextRCQ26T_phi210T_preserveRC10Parameters" \
518 "T_phi2::T_preserve::FPC_next::relativeId(T_phi2::T_preserve const &, Parameters const &) const"
519
520 test_demangling_exact "gnu: _Utf390_1__1_9223372036854775807__9223372036854775" \
521 "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
522 test_demangling_exact "gnu: foo__I40" "foo(int64_t)"
523 test_demangling_exact "gnu: foo__I_200_" "foo(int512_t)"
524 test_demangling_exact "gnu: foo__I_200" "Can't demangle \"foo__I_200\""
525
526 # Rvalue reference tests
527 test_demangling_exact "gnu-v3: _ZN9ArrowLine19ArrowheadIntersectsEP9ArrowheadO6BoxObjP7Graphic" "ArrowLine::ArrowheadIntersects(Arrowhead*, BoxObj&&, Graphic*)"
528 test_demangling "gnu-v3: _Z13BitPatterntoaOK10BitPatternccc" \
529 "BitPatterntoa\[(\]+(const BitPattern|BitPattern const)&&, char, char, char\[)\]+"
530 test_demangling_exact "gnu-v3: _ZN8TextCode14CoreConstDeclsEO7ostream" "TextCode::CoreConstDecls(ostream&&)"
531 test_demangling "gnu-v3: _Z31DrawDestinationTransformedImageP7_XImageiiS0_iimjiijmmP4_XGCOK13ivTransformeriiii" \
532 "DrawDestinationTransformedImage\[(\]+_XImage\[*\]+, int, int, _XImage\[*\]+, int, int, unsigned long, unsigned int, int, int, unsigned int, unsigned long, unsigned long, _XGC\[*\]+, (const ivTransformer|ivTransformer const)&&, int, int, int, int\[)\]+"
533 test_demangling_exact "gnu-v3: _ZN11RelateManip6EffectEO7ivEvent" "RelateManip::Effect(ivEvent&&)"
534 test_demangling_exact "gnu-v3: _ZN20DisplayList_IteratorC4EO11DisplayList" "DisplayList_Iterator::DisplayList_Iterator(DisplayList&&)"
535 test_demangling_exact "gnu-v3: _ZN3fooC4EOS_" "foo::foo(foo&&)"
536 test_demangling_exact "gnu-v3: _ZN3fooC4EiOS_iS0_iS0_" "foo::foo(int, foo&&, int, foo&&, int, foo&&)"
537 test_demangling "gnu-v3: _ZN7ivWorldC2EPKcOiPPcPK12ivOptionDescPK14ivPropertyData" \
538 "ivWorld::ivWorld\[(\]+(const char|char const)\[*\]+, int&&, char\[*\]+\[*\]+, (const ivOptionDesc|ivOptionDesc const)\[*\]+, (const ivPropertyData|ivPropertyData const)\[*\]+\[)\]+"
539 test_demangling "gnu-v3: _Z3argOK7Complex" \
540 "arg\[(\]+(const Complex|Complex const)&&\[)\]+"
541 test_demangling "gnu-v3: _ZNK9BitString8containsEOK10BitPattern" \
542 "BitString::contains\[(\]+(const BitPattern|BitPattern const)&&\[)\]+ const"
543 test_demangling "gnu-v3: _ZNK9BitString8containsEOK12BitSubStringi" \
544 "BitString::contains\[(\]+(const BitSubString|BitSubString const)&&, int\[)\]+ const"
545 test_demangling "gnu-v3: _ZNK9BitString8containsEOKS_" \
546 "BitString::contains\[(\]+(const BitString|BitString const)&&\[)\]+ const"
547 test_demangling_exact "gnu-v3: _ZN4ListI10VHDLEntityE3PixC4EOKS2_" \
548 "List<VHDLEntity>::Pix::Pix(List<VHDLEntity>::Pix const&&)"
549 test_demangling_exact "gnu-v3: _ZN4ListI10VHDLEntityE7elementC2EOKS0_PS2_" \
550 "List<VHDLEntity>::element::element(VHDLEntity const&&, List<VHDLEntity>::element*)"
551 test_demangling_exact "gnu-v3: _ZN4ListI10VHDLEntityE7elementC4EOKS2_" \
552 "List<VHDLEntity>::element::element(List<VHDLEntity>::element const&&)"
553 test_demangling_exact "gnu-v3: _ZNK4ListI10VHDLEntityEclEOKNS1_3PixE" \
554 "List<VHDLEntity>::operator()(List<VHDLEntity>::Pix const&&) const"
555 test_demangling_exact "gnu-v3: _ZN4ListI10VHDLEntityEC4EOKS1_" \
556 "List<VHDLEntity>::List(List<VHDLEntity> const&&)"
557 test_demangling_exact "gnu-v3: _ZN4PixXI11VHDLLibrary14VHDLLibraryRep4ListI10VHDLEntityEEC2EOKS5_" \
558 "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > const&&)"
559 test_demangling_exact "gnu-v3: _ZNK11VHDLLibrary5nextEEO4PixXIS_14VHDLLibraryRep4ListI10VHDLEntityEE" \
560 "VHDLLibrary::nextE(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >&&) const"
561 test_demangling_exact "gnu-v3: _ZNK4ListI10VHDLEntityE4nextEONS1_3PixE" \
562 "List<VHDLEntity>::next(List<VHDLEntity>::Pix&&) const"
563
564 ## Buffer overrun. Should make GDB crash. Woo hoo!
565 test_demangling_exact "gnu: foo__I_4000000000000000000000000000000000000000000000000000000000000000000000000" "Can't demangle \"foo__I_4000000000000000000000000000000000000000000000000000000000000000000000000\""
566
567 ## 1999-04-19: "Fix from Dale Hawkins". Shouldn't segfault.
568 # Accept even a dubious demangling; the string is ambiguous.
569
570 gdb_test_multiple "demangle __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" {
571 -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 $" {
572 pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
573 }
574 -re ".*Can't demangle \"__thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator\"\r\n$gdb_prompt $" {
575 pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
576 }
577 }
578 }
579
580 #
581 # Test lucid style name demangling
582 #
583
584 proc test_lucid_style_demangling {} {
585 test_demangling_exact "lucid: WS__FR7istream" "WS(istream &)"
586 test_demangling_exact "lucid: __aa__3fooFR3foo" "foo::operator&&(foo &)"
587 test_demangling_exact "lucid: __aad__3fooFR3foo" "foo::operator&=(foo &)"
588 test_demangling_exact "lucid: __ad__3fooFR3foo" "foo::operator&(foo &)"
589 test_demangling_exact "lucid: __adv__3fooFR3foo" "foo::operator/=(foo &)"
590 test_demangling_exact "lucid: __adv__7complexF7complex" "complex::operator/=(complex)"
591 test_demangling_exact "lucid: __aer__3fooFR3foo" "foo::operator^=(foo &)"
592 test_demangling_exact "lucid: __als__3fooFR3foo" "foo::operator<<=(foo &)"
593 test_demangling_exact "lucid: __amd__3fooFR3foo" "foo::operator%=(foo &)"
594 test_demangling_exact "lucid: __ami__3fooFR3foo" "foo::operator-=(foo &)"
595 test_demangling_exact "lucid: __amu__3fooFR3foo" "foo::operator*=(foo &)"
596 test_demangling_exact "lucid: __amu__7complexF7complex" "complex::operator*=(complex)"
597 test_demangling_exact "lucid: __aor__3fooFR3foo" "foo::operator|=(foo &)"
598 test_demangling_exact "lucid: __apl__3fooFR3foo" "foo::operator+=(foo &)"
599 test_demangling_exact "lucid: __ars__3fooFR3foo" "foo::operator>>=(foo &)"
600 test_demangling_exact "lucid: __as__18istream_withassignFP9streambuf" "istream_withassign::operator=(streambuf *)"
601 test_demangling_exact "lucid: __as__18istream_withassignFR7istream" "istream_withassign::operator=(istream &)"
602 test_demangling_exact "lucid: __as__3fooFR3foo" "foo::operator=(foo &)"
603 test_demangling_exact "lucid: __as__3iosFR3ios" "ios::operator=(ios &)"
604 test_demangling_exact "lucid: __cl__3fooFR3foo" "foo::operator()(foo &)"
605 test_demangling_exact "lucid: __cm__3fooFR3foo" "foo::operator, (foo &)"
606
607 test_demangling_exact "lucid: __co__3fooFv" "foo::operator~(void)"
608 test_demangling_exact "lucid: __ct__10istrstreamFPc" "istrstream::istrstream(char *)"
609 test_demangling_exact "lucid: __ct__10istrstreamFPci" "istrstream::istrstream(char *, int)"
610 test_demangling_exact "lucid: __ct__10ostrstreamFPciT2" "ostrstream::ostrstream(char *, int, int)"
611 test_demangling_exact "lucid: __ct__10ostrstreamFv" "ostrstream::ostrstream(void)"
612 test_demangling_exact "lucid: __ct__10smanip_intFPFR3iosi_R3iosi" "smanip_int::smanip_int(ios &(*)(ios &, int), int)"
613 test_demangling "lucid: __ct__11c_exceptionFPcRC7complexT2" "c_exception::c_exception\[(\]+char \[*\]+, (const complex|complex const) &, (const complex|complex const) &\[)\]+"
614 test_demangling "lucid: __ct__11fstreambaseFPCciT2" "fstreambase::fstreambase\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
615 test_demangling_exact "lucid: __ct__11fstreambaseFi" "fstreambase::fstreambase(int)"
616 test_demangling_exact "lucid: __ct__11fstreambaseFiPcT1" "fstreambase::fstreambase(int, char *, int)"
617 test_demangling_exact "lucid: __ct__11fstreambaseFv" "fstreambase::fstreambase(void)"
618 test_demangling_exact "lucid: __ct__11smanip_longFPFR3iosl_R3iosl" "smanip_long::smanip_long(ios &(*)(ios &, long), long)"
619 test_demangling_exact "lucid: __ct__11stdiostreamFP4FILE" "stdiostream::stdiostream(FILE *)"
620 test_demangling_exact "lucid: __ct__12strstreambufFPFl_PvPFPv_v" "strstreambuf::strstreambuf(void *(*)(long), void (*)(void *))"
621 test_demangling_exact "lucid: __ct__12strstreambufFPUciT1" "strstreambuf::strstreambuf(unsigned char *, int, unsigned char *)"
622 test_demangling_exact "lucid: __ct__12strstreambufFPciT1" "strstreambuf::strstreambuf(char *, int, char *)"
623 test_demangling_exact "lucid: __ct__12strstreambufFi" "strstreambuf::strstreambuf(int)"
624 test_demangling_exact "lucid: __ct__12strstreambufFv" "strstreambuf::strstreambuf(void)"
625 test_demangling_exact "lucid: __ct__13strstreambaseFPciT1" "strstreambase::strstreambase(char *, int, char *)"
626 test_demangling_exact "lucid: __ct__3fooFR3foo" "foo::foo(foo &)"
627
628 test_demangling_exact "lucid: __ct__3fooFi" "foo::foo(int)"
629 test_demangling_exact "lucid: __ct__3fooFiN31" "foo::foo(int, int, int, int)"
630 test_demangling "lucid: __ct__3fooFiPCc" \
631 "foo::foo\[(\]+int, (const char|char const) \[*\]+\[)\]+"
632 test_demangling_exact "lucid: __ct__3fooFiR3fooT1T2T1T2" "foo::foo(int, foo &, int, foo &, int, foo &)"
633 test_demangling_exact "lucid: __ct__3iosFP9streambuf" "ios::ios(streambuf *)"
634 test_demangling_exact "lucid: __ct__7filebufFiPcT1" "filebuf::filebuf(int, char *, int)"
635 test_demangling "lucid: __ct__7fstreamFPCciT2" \
636 "fstream::fstream\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
637 test_demangling_exact "lucid: __ct__7fstreamFiPcT1" "fstream::fstream(int, char *, int)"
638 test_demangling_exact "lucid: __ct__7istreamFP9streambuf" "istream::istream(streambuf *)"
639 test_demangling_exact "lucid: __ct__7istreamFP9streambufiP7ostream" "istream::istream(streambuf *, int, ostream *)"
640 test_demangling_exact "lucid: __ct__7istreamFiPcT1" "istream::istream(int, char *, int)"
641 test_demangling_exact "lucid: __ct__7istreamFiT1P7ostream" "istream::istream(int, int, ostream *)"
642 test_demangling_exact "lucid: __ct__7ostreamFP9streambuf" "ostream::ostream(streambuf *)"
643 test_demangling_exact "lucid: __ct__7ostreamFiPc" "ostream::ostream(int, char *)"
644 test_demangling "lucid: __ct__8ifstreamFPCciT2" \
645 "ifstream::ifstream\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
646 test_demangling_exact "lucid: __ct__8ifstreamFiPcT1" "ifstream::ifstream(int, char *, int)"
647
648 test_demangling_exact "lucid: __ct__Q23foo3barFv" "foo::bar::bar(void)"
649 test_demangling_exact "lucid: __ct__Q33foo3bar4bellFv" "foo::bar::bell::bell(void)"
650 test_demangling_exact "lucid: __dl__3fooSFPv" "foo::operator delete(void *) static"
651 test_demangling_exact "lucid: __dl__FPv" "operator delete(void *)"
652 test_demangling_exact "lucid: __dt__10istrstreamFv" "istrstream::~istrstream(void)"
653
654 test_demangling_exact "lucid: __dt__Q23foo3barFv" "foo::bar::~bar(void)"
655 test_demangling_exact "lucid: __dt__Q33foo3bar4bellFv" "foo::bar::bell::~bell(void)"
656 test_demangling_exact "lucid: __dv__3fooFR3foo" "foo::operator/(foo &)"
657 test_demangling_exact "lucid: __dv__F7complexT1" "operator/(complex, complex)"
658 test_demangling_exact "lucid: __eq__3fooFR3foo" "foo::operator==(foo &)"
659 test_demangling_exact "lucid: __er__3fooFR3foo" "foo::operator^(foo &)"
660 test_demangling_exact "lucid: __ge__3fooFR3foo" "foo::operator>=(foo &)"
661 test_demangling_exact "lucid: __gt__3fooFR3foo" "foo::operator>(foo &)"
662 test_demangling_exact "lucid: __le__3fooFR3foo" "foo::operator<=(foo &)"
663 test_demangling_exact "lucid: __ls__3fooFR3foo" "foo::operator<<(foo &)"
664 test_demangling_exact "lucid: __ls__7ostreamFP9streambuf" "ostream::operator<<(streambuf *)"
665
666 test_demangling "lucid: __ls__7ostreamFPCc" \
667 "ostream::operator<<\[(\]+(const char|char const) \[*\]+\[)\]+"
668 test_demangling_exact "lucid: __ls__7ostreamFPFR3ios_R3ios" "ostream::operator<<(ios &(*)(ios &))"
669 test_demangling_exact "lucid: __ls__7ostreamFPv" "ostream::operator<<(void *)"
670 test_demangling_exact "lucid: __ls__7ostreamFUi" "ostream::operator<<(unsigned int)"
671 test_demangling_exact "lucid: __ls__7ostreamFUl" "ostream::operator<<(unsigned long)"
672 test_demangling_exact "lucid: __ls__7ostreamFd" "ostream::operator<<(double)"
673 test_demangling_exact "lucid: __ls__7ostreamFf" "ostream::operator<<(float)"
674 test_demangling_exact "lucid: __ls__7ostreamFi" "ostream::operator<<(int)"
675 test_demangling_exact "lucid: __ls__7ostreamFl" "ostream::operator<<(long)"
676 test_demangling_exact "lucid: __ls__FR7ostream7complex" "operator<<(ostream &, complex)"
677 test_demangling_exact "lucid: __lt__3fooFR3foo" "foo::operator<(foo &)"
678 test_demangling_exact "lucid: __md__3fooFR3foo" "foo::operator%(foo &)"
679 test_demangling_exact "lucid: __mi__3fooFR3foo" "foo::operator-(foo &)"
680 test_demangling_exact "lucid: __ml__3fooFR3foo" "foo::operator*(foo &)"
681 test_demangling_exact "lucid: __ml__F7complexT1" "operator*(complex, complex)"
682 test_demangling_exact "lucid: __mm__3fooFi" "foo::operator--(int)"
683 test_demangling_exact "lucid: __ne__3fooFR3foo" "foo::operator!=(foo &)"
684 test_demangling_exact "lucid: __nt__3fooFv" "foo::operator!(void)"
685 test_demangling_exact "lucid: __nw__3fooSFi" "foo::operator new(int) static"
686 test_demangling_exact "lucid: __nw__FUi" "operator new(unsigned int)"
687 test_demangling_exact "lucid: __nw__FUiPv" "operator new(unsigned int, void *)"
688 test_demangling_exact "lucid: __oo__3fooFR3foo" "foo::operator||(foo &)"
689 test_demangling_exact "lucid: __opPc__3fooFv" "foo::operator char *(void)"
690 test_demangling_exact "lucid: __opi__3fooFv" "foo::operator int(void)"
691 test_demangling_exact "lucid: __or__3fooFR3foo" "foo::operator|(foo &)"
692
693 test_demangling_exact "lucid: __pl__3fooFR3foo" "foo::operator+(foo &)"
694 test_demangling_exact "lucid: __pp__3fooFi" "foo::operator++(int)"
695 test_demangling_exact "lucid: __pt__3fooFv" "foo::operator->(void)"
696 test_demangling_exact "lucid: __rm__3fooFR3foo" "foo::operator->*(foo &)"
697 test_demangling_exact "lucid: __rs__3fooFR3foo" "foo::operator>>(foo &)"
698 test_demangling_exact "lucid: __rs__7istreamFP9streambuf" "istream::operator>>(streambuf *)"
699 test_demangling_exact "lucid: __rs__7istreamFPFR3ios_R3ios" "istream::operator>>(ios &(*)(ios &))"
700 test_demangling_exact "lucid: __rs__7istreamFPFR7istream_R7istream" "istream::operator>>(istream &(*)(istream &))"
701 test_demangling_exact "lucid: __rs__7istreamFPUc" "istream::operator>>(unsigned char *)"
702 test_demangling_exact "lucid: __rs__7istreamFPc" "istream::operator>>(char *)"
703 test_demangling_exact "lucid: __rs__7istreamFRUi" "istream::operator>>(unsigned int &)"
704 test_demangling_exact "lucid: __rs__7istreamFRUl" "istream::operator>>(unsigned long &)"
705 test_demangling_exact "lucid: __rs__7istreamFRUs" "istream::operator>>(unsigned short &)"
706 test_demangling_exact "lucid: __rs__7istreamFRd" "istream::operator>>(double &)"
707 test_demangling_exact "lucid: __rs__7istreamFRf" "istream::operator>>(float &)"
708 test_demangling_exact "lucid: __rs__7istreamFRi" "istream::operator>>(int &)"
709 test_demangling_exact "lucid: __rs__7istreamFRl" "istream::operator>>(long &)"
710 test_demangling_exact "lucid: __rs__7istreamFRs" "istream::operator>>(short &)"
711 test_demangling_exact "lucid: __rs__FR7istreamR7complex" "operator>>(istream &, complex &)"
712 test_demangling "lucid: __vc__3fooFR3foo" "foo::operator\\\[\\\]\\(foo &\\)"
713 test_demangling_exact "lucid: __vtbl__10istrstream" "istrstream virtual table"
714 test_demangling_exact "lucid: __vtbl__17ostream__iostream__19iostream_withassign" "iostream_withassign::ostream__iostream virtual table"
715
716 test_demangling_exact "lucid: __vtbl__3ios" "ios virtual table"
717 test_demangling_exact "lucid: __vtbl__3ios__13strstreambase" "strstreambase::ios virtual table"
718
719 # GDB 930414 demangles this as t_cc_main_ (obviously wrong).
720 # GDB 930701 gets into an infinite loop.
721 # GDB 930727 says "Can't demangle".
722 # What is the correct demangling? FIXME.
723
724 # NOTE: carlton/2003-01-17: No, don't FIXME, just obsolete lucid.
725 # I'm KFAILing this rather than deleting it for form's sake.
726 setup_kfail "gdb/945" "*-*-*"
727 test_demangling_exact "lucid: __vtbl__3foo__vt_cc_main_" ""
728
729 test_demangling_exact "lucid: abs__F7complex" "abs(complex)"
730 test_demangling_exact "lucid: allocate__9streambufFv" "streambuf::allocate(void)"
731 test_demangling_exact "lucid: attach__11fstreambaseFi" "fstreambase::attach(int)"
732 test_demangling_exact "lucid: bitalloc__3iosSFv" "ios::bitalloc(void) static"
733 test_demangling_exact "lucid: chr__FiT1" "chr(int, int)"
734 test_demangling_exact "lucid: complex_error__FR11c_exception" "complex_error(c_exception &)"
735 test_demangling_exact "lucid: complexfunc2__FPFPc_i" "complexfunc2(int (*)(char *))"
736 test_demangling_exact "lucid: complexfunc3__FPFPFPl_s_i" "complexfunc3(int (*)(short (*)(long *)))"
737
738 test_demangling_exact "lucid: complexfunc4__FPFPFPc_s_i" "complexfunc4(int (*)(short (*)(char *)))"
739 test_demangling_exact "lucid: complexfunc5__FPFPc_PFl_i" "complexfunc5(int (*(*)(char *))(long))"
740 test_demangling_exact "lucid: complexfunc6__FPFPi_PFl_i" "complexfunc6(int (*(*)(int *))(long))"
741 test_demangling_exact "lucid: complexfunc7__FPFPFPc_i_PFl_i" "complexfunc7(int (*(*)(int (*)(char *)))(long))"
742 test_demangling_exact "lucid: complicated_put__7ostreamFc" "ostream::complicated_put(char)"
743 test_demangling_exact "lucid: conv10__FlPc" "conv10(long, char *)"
744 test_demangling_exact "lucid: conv16__FUlPc" "conv16(unsigned long, char *)"
745 test_demangling_exact "lucid: dec__FR3ios" "dec(ios &)"
746 test_demangling_exact "lucid: dec__Fli" "dec(long, int)"
747 test_demangling_exact "lucid: dofield__FP7ostreamPciT2T3" "dofield(ostream *, char *, int, char *, int)"
748
749 test_demangling_exact "lucid: flags__3iosFl" "ios::flags(long)"
750 test_demangling_exact "lucid: flags__3iosFv" "ios::flags(void)"
751 test_demangling_exact "lucid: foo__FiN31" "foo(int, int, int, int)"
752 test_demangling_exact "lucid: foo__FiR3fooT1T2T1T2" "foo(int, foo &, int, foo &, int, foo &)"
753 test_demangling_exact "lucid: foo___3barFl" "bar::foo_(long)"
754 test_demangling "lucid: form__FPCce" "form\[(\]+(const char|char const) \[*\]+,...\[)\]+"
755 test_demangling_exact "lucid: get__7istreamFPcic" "istream::get(char *, int, char)"
756 test_demangling_exact "lucid: get__7istreamFR9streambufc" "istream::get(streambuf &, char)"
757 test_demangling_exact "lucid: get_complicated__7istreamFRUc" "istream::get_complicated(unsigned char &)"
758 test_demangling_exact "lucid: get_complicated__7istreamFRc" "istream::get_complicated(char &)"
759 test_demangling_exact "lucid: getline__7istreamFPUcic" "istream::getline(unsigned char *, int, char)"
760 test_demangling_exact "lucid: getline__7istreamFPcic" "istream::getline(char *, int, char)"
761
762 test_demangling_exact "lucid: ignore__7istreamFiT1" "istream::ignore(int, int)"
763 test_demangling_exact "lucid: init__12strstreambufFPciT1" "strstreambuf::init(char *, int, char *)"
764 test_demangling_exact "lucid: init__3iosFP9streambuf" "ios::init(streambuf *)"
765 test_demangling_exact "lucid: initcount__13Iostream_init" "Iostream_init::initcount"
766 test_demangling_exact "lucid: ipfx__7istreamFi" "istream::ipfx(int)"
767 test_demangling_exact "lucid: ls_complicated__7ostreamFUc" "ostream::ls_complicated(unsigned char)"
768 test_demangling_exact "lucid: ls_complicated__7ostreamFc" "ostream::ls_complicated(char)"
769 test_demangling "lucid: open__11fstreambaseFPCciT2" \
770 "fstreambase::open\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
771 test_demangling "lucid: open__7filebufFPCciT2" \
772 "filebuf::open\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
773
774 test_demangling_exact "lucid: overload1arg__FSc" "overload1arg(signed char)"
775 test_demangling_exact "lucid: overload1arg__FUc" "overload1arg(unsigned char)"
776 test_demangling_exact "lucid: overload1arg__FUi" "overload1arg(unsigned int)"
777 test_demangling_exact "lucid: overload1arg__FUl" "overload1arg(unsigned long)"
778 test_demangling_exact "lucid: overload1arg__FUs" "overload1arg(unsigned short)"
779 test_demangling_exact "lucid: overload1arg__Fc" "overload1arg(char)"
780 test_demangling_exact "lucid: overload1arg__Fd" "overload1arg(double)"
781 test_demangling_exact "lucid: overload1arg__Ff" "overload1arg(float)"
782 test_demangling_exact "lucid: overload1arg__Fi" "overload1arg(int)"
783 test_demangling_exact "lucid: overload1arg__Fl" "overload1arg(long)"
784 test_demangling_exact "lucid: overload1arg__Fs" "overload1arg(short)"
785 test_demangling_exact "lucid: overload1arg__Fv" "overload1arg(void)"
786 test_demangling_exact "lucid: overloadargs__FiN21" "overloadargs(int, int, int)"
787 test_demangling_exact "lucid: overloadargs__FiN31" "overloadargs(int, int, int, int)"
788 test_demangling_exact "lucid: overloadargs__FiN41" "overloadargs(int, int, int, int, int)"
789 test_demangling_exact "lucid: overloadargs__FiN51" "overloadargs(int, int, int, int, int, int)"
790 test_demangling_exact "lucid: overloadargs__FiN61" "overloadargs(int, int, int, int, int, int, int)"
791
792 test_demangling_exact "lucid: overloadargs__FiN71" "overloadargs(int, int, int, int, int, int, int, int)"
793 test_demangling_exact "lucid: overloadargs__FiN81" "overloadargs(int, int, int, int, int, int, int, int, int)"
794 test_demangling_exact "lucid: overloadargs__FiN91" "overloadargs(int, int, int, int, int, int, int, int, int, int)"
795 test_demangling_exact "lucid: overloadargs__FiN91N11" "overloadargs(int, int, int, int, int, int, int, int, int, int, int)"
796 test_demangling_exact "lucid: overloadargs__FiT1" "overloadargs(int, int)"
797 test_demangling_exact "lucid: polar__FdT1" "polar(double, double)"
798 test_demangling_exact "lucid: pow__F7complexT1" "pow(complex, complex)"
799 test_demangling_exact "lucid: pow__F7complexd" "pow(complex, double)"
800 test_demangling_exact "lucid: pow__F7complexi" "pow(complex, int)"
801 test_demangling_exact "lucid: pow__Fd7complex" "pow(double, complex)"
802 test_demangling_exact "lucid: pstart__FPciT2" "pstart(char *, int, int)"
803 test_demangling_exact "lucid: put__7ostreamFc" "ostream::put(char)"
804
805 test_demangling_exact "lucid: read__7istreamFPci" "istream::read(char *, int)"
806 test_demangling_exact "lucid: resetiosflags__FR3iosl" "resetiosflags(ios &, long)"
807 test_demangling_exact "lucid: restore_errno__FRi" "restore_errno(int &)"
808 test_demangling_exact "lucid: rs_complicated__7istreamFRUc" "istream::rs_complicated(unsigned char &)"
809 test_demangling_exact "lucid: rs_complicated__7istreamFRc" "istream::rs_complicated(char &)"
810 test_demangling_exact "lucid: seekg__7istreamFl8seek_dir" "istream::seekg(long, seek_dir)"
811 test_demangling_exact "lucid: seekoff__12strstreambufFl8seek_diri" "strstreambuf::seekoff(long, seek_dir, int)"
812 test_demangling_exact "lucid: seekoff__9streambufFlQ2_3ios12ios_seek_diri" "streambuf::seekoff(long, ios::ios_seek_dir, int)"
813 test_demangling_exact "lucid: seekpos__9streambufFli" "streambuf::seekpos(long, int)"
814 test_demangling_exact "lucid: set_new_handler__FPFv_v" "set_new_handler(void (*)(void))"
815 test_demangling_exact "lucid: setb__9streambufFPcT1i" "streambuf::setb(char *, char *, int)"
816
817 test_demangling_exact "lucid: setb__FR3iosi" "setb(ios &, int)"
818 test_demangling_exact "lucid: setbuf__11fstreambaseFPci" "fstreambase::setbuf(char *, int)"
819 test_demangling_exact "lucid: setbuf__9streambufFPUci" "streambuf::setbuf(unsigned char *, int)"
820 test_demangling_exact "lucid: setbuf__9streambufFPciT2" "streambuf::setbuf(char *, int, int)"
821 test_demangling_exact "lucid: setf__3iosFlT1" "ios::setf(long, long)"
822 test_demangling_exact "lucid: setfill__FR3iosi" "setfill(ios &, int)"
823 test_demangling_exact "lucid: setg__9streambufFPcN21" "streambuf::setg(char *, char *, char *)"
824 test_demangling_exact "lucid: setp__9streambufFPcT1" "streambuf::setp(char *, char *)"
825
826 test_demangling "lucid: sputn__9streambufFPCci" \
827 "streambuf::sputn\[(\]+(const char|char const) \[*\]+, int\[)\]+"
828 test_demangling "lucid: str__FPCci" \
829 "str\[(\]+(const char|char const) \[*\]+, int\[)\]+"
830 test_demangling_exact "lucid: tie__3iosFP7ostream" "ios::tie(ostream *)"
831 test_demangling_exact "lucid: uconv10__FUlPc" "uconv10(unsigned long, char *)"
832
833 test_demangling "lucid: write__7ostreamFPCci" \
834 "ostream::write\[(\]+(const char|char const) \[*\]+, int\[)\]+"
835 test_demangling_exact "lucid: xget__7istreamFPc" "istream::xget(char *)"
836 test_demangling_exact "lucid: xsgetn__9streambufFPci" "streambuf::xsgetn(char *, int)"
837 test_demangling "lucid: xsputn__9streambufFPCci" \
838 "streambuf::xsputn\[(\]+(const char|char const) \[*\]+, int\[)\]+"
839
840 test_demangling_exact "lucid: _Utf390_1__1_9223372036854775807__9223372036854775" \
841 "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
842 }
843
844 #
845 # Test arm style name demangling
846 #
847
848 proc test_arm_style_demangling {} {
849 test_demangling_exact "arm: __dt__21T5__pt__11_PFiPPdPv_iFv" "T5<int (*)(int, double **, void *)>::~T5(void)"
850
851 test_demangling_exact "arm: __ct__1cFi" "c::c(int)"
852
853 test_demangling_exact "arm: __dt__11T5__pt__2_iFv" "T5<int>::~T5(void)"
854
855 test_demangling_exact "arm: __dt__11T5__pt__2_cFv" "T5<char>::~T5(void)"
856
857 test_demangling_exact "arm: __ct__2T2Fi" "T2::T2(int)"
858 test_demangling_exact "arm: __dt__2T1Fv" "T1::~T1(void)"
859
860 test_demangling_exact "arm: __dt__12T5__pt__3_1xFv" "T5<x>::~T5(void)"
861
862 test_demangling_exact "arm: __dt__17T5__pt__8_PFcPv_iFv" "T5<int (*)(char, void *)>::~T5(void)"
863
864 test_demangling "arm: g__FP1cPC1cT1" \
865 "g\[(\]+c *\[*\]+, (const c|c const) *\[*\]+, c *\[*\]+\[)\]+"
866 test_demangling "arm: g__FPUlPCUlT1" \
867 "g\[(\]+unsigned long \[*\]+, (const unsigned long|unsigned long const) \[*\]+, unsigned long \[*\]+\[)\]+"
868 test_demangling "arm: g__FPUiPCUiT1" \
869 "g\[(\]+unsigned int \[*\]+, (const unsigned int|unsigned int const) \[*\]+, unsigned int \[*\]+\[)\]+"
870 test_demangling "arm: g__FPUsPCUsT1" \
871 "g\[(\]+unsigned short \[*\]+, (const unsigned short|unsigned short const) \[*\]+, unsigned short \[*\]+\[)\]+"
872 test_demangling "arm: g__FPUcPCUcT1" \
873 "g\[(\]+unsigned char \[*\]+, (const unsigned char|unsigned char const) \[*\]+, unsigned char \[*\]+\[)\]+"
874 test_demangling "arm: g__F1TPlPClT2" \
875 "g\[(\]+T, long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
876 test_demangling "arm: g__F1RRlRClT2" \
877 "g\[(\]+R, long &, (const long|long const) &, long &\[)\]+"
878 test_demangling "arm: g__F1TPiPCiT2" \
879 "g\[(\]+T, int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
880 test_demangling "arm: g__F1RRiRCiT2" \
881 "g\[(\]+R, int &, (const int|int const) &, int &\[)\]+"
882 test_demangling "arm: g__F1TPsPCsT2" \
883 "g\[(\]+T, short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
884 test_demangling "arm: g__F1RRsRCsT2" \
885 "g\[(\]+R, short &, (const short|short const) &, short &\[)\]+"
886 test_demangling "arm: g__F1TPcPCcT2" \
887 "g\[(\]+T, char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
888 test_demangling "arm: g__F1RRcRCcT2" \
889 "g\[(\]+R, char &, (const char|char const) &, char &\[)\]+"
890
891 test_demangling_exact "arm: __ct__21T5__pt__11_PFiPPdPv_iFi" "T5<int (*)(int, double **, void *)>::T5(int)"
892
893 test_demangling "arm: __gt__FRC2T2c" \
894 "operator>\[(\]+(const T2|T2 const) &, char\[)\]+"
895 test_demangling "arm: __ge__FRC2T2c" \
896 "operator>=\[(\]+(const T2|T2 const) &, char\[)\]+"
897 test_demangling "arm: __lt__FRC2T2c" \
898 "operator<\[(\]+(const T2|T2 const) &, char\[)\]+"
899
900 test_demangling "arm: __le__FRC2T2c" \
901 "operator<=\[(\]+(const T2|T2 const) &, char\[)\]+"
902 test_demangling "arm: __ne__FRC2T2c" \
903 "operator!=\[(\]+(const T2|T2 const) &, char\[)\]+"
904 test_demangling "arm: __eq__FRC2T2c" \
905 "operator==\[(\]+(const T2|T2 const) &, char\[)\]+"
906 test_demangling_exact "arm: __amd__FR2T2i" "operator%=(T2 &, int)"
907 test_demangling_exact "arm: __adv__FR2T2i" "operator/=(T2 &, int)"
908 test_demangling_exact "arm: __amu__FR2T2i" "operator*=(T2 &, int)"
909 test_demangling_exact "arm: __ami__FR2T2i" "operator-=(T2 &, int)"
910 test_demangling_exact "arm: __apl__FR2T2i" "operator+=(T2 &, int)"
911 test_demangling_exact "arm: __nw__2T1SFUi" "T1::operator new(unsigned int) static"
912 test_demangling_exact "arm: __dl__2T1SFPv" "T1::operator delete(void *) static"
913 test_demangling_exact "arm: put__2T7SFi" "T7::put(int) static"
914
915 test_demangling_exact "arm: __dl__12T5__pt__3_1xSFPv" "T5<x>::operator delete(void *) static"
916
917 test_demangling_exact "arm: h__FUc" "h(unsigned char)"
918 test_demangling_exact "arm: f__Fic" "f(int, char)"
919 test_demangling_exact "arm: h__FUi" "h(unsigned int)"
920 test_demangling_exact "arm: h__Fci" "h(char, int)"
921 test_demangling_exact "arm: h__FUl" "h(unsigned long)"
922 test_demangling_exact "arm: h__Fcl" "h(char, long)"
923 test_demangling_exact "arm: h__FUs" "h(unsigned short)"
924 test_demangling_exact "arm: h__Fcs" "h(char, short)"
925 test_demangling "arm: __amd__FR2T2RC2T2" \
926 "operator%=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
927 test_demangling "arm: __adv__FR2T2RC2T2" \
928 "operator/=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
929 test_demangling "arm: __amu__FR2T2RC2T2" \
930 "operator\[*\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
931 test_demangling "arm: __ami__FR2T2RC2T2" \
932 "operator-=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
933 test_demangling "arm: __apl__FR2T2RC2T2" \
934 "operator\[+\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
935
936 test_demangling "arm: g__F1SRPUlRPCUlT2" \
937 "g\[(\]+S, unsigned long \[*\]+&, (const unsigned long|unsigned long const) \[*\]+&, unsigned long \[*\]+&\[)\]+"
938 test_demangling "arm: g__F1SRPUiRPCUiT2" \
939 "g\[(\]+S, unsigned int \[*\]+&, (const unsigned int|unsigned int const) \[*\]+&, unsigned int \[*\]+&\[)\]+"
940 test_demangling "arm: g__F1SRPUsRPCUsT2" \
941 "g\[(\]+S, unsigned short \[*\]+&, (const unsigned short|unsigned short const) \[*\]+&, unsigned short \[*\]+&\[)\]+"
942 test_demangling "arm: g__F1SRPUcRPCUcT2" \
943 "g\[(\]+S, unsigned char \[*\]+&, (const unsigned char|unsigned char const) \[*\]+&, unsigned char \[*\]+&\[)\]+"
944 test_demangling "arm: g__F1T1SRPlRPClT3" \
945 "g\[(\]+T, S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
946 test_demangling "arm: g__F1T1SRPiRPCiT3" \
947 "g\[(\]+T, S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
948 test_demangling "arm: g__F1T1SRPcRPCcT3" \
949 "g\[(\]+T, S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
950
951 test_demangling_exact "arm: X__12T5__pt__3_1x" "T5<x>::X"
952
953 test_demangling_exact "arm: __ct__11T5__pt__2_iFi" "T5<int>::T5(int)"
954
955 test_demangling_exact "arm: __ct__11T5__pt__2_cFi" "T5<char>::T5(int)"
956
957 test_demangling "arm: __gt__FRC2T2T1" \
958 "operator>\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
959 test_demangling "arm: __ge__FRC2T2T1" \
960 "operator>=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
961 test_demangling "arm: __lt__FRC2T2T1" \
962 "operator<\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
963 test_demangling "arm: __le__FRC2T2T1" \
964 "operator<=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
965 test_demangling "arm: __ne__FRC2T2T1" \
966 "operator!=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
967 test_demangling "arm: __eq__FRC2T2T1" \
968 "operator==\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
969 test_demangling "arm: g__FcR1cRC1cT2" \
970 "g\[(\]+char, c &, (const c|c const) &, c &\[)\]+"
971 test_demangling "arm: g__FcRPdRPCdT2" \
972 "g\[(\]+char, double *\[*\]+&, (const double|double const) *\[*\]+&, double *\[*\]+&\[)\]+"
973 test_demangling "arm: g__FcRPfRPCfT2" \
974 "g\[(\]+char, float *\[*\]+&, (const float|float const) *\[*\]+&, float *\[*\]+&\[)\]+"
975 test_demangling_exact "arm: h__FcT1" "h(char, char)"
976 test_demangling_exact "arm: f__Ficd" "f(int, char, double)"
977 test_demangling "arm: g__F1T1SdRPsRPCsT4" \
978 "g\[(\]+T, S, double, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
979 test_demangling "arm: g__F1cC1cT1" \
980 "g\[(\]+c, (const c|c const), c\[)\]+"
981 test_demangling "arm: g__FPdPCdT1" \
982 "g\[(\]+double *\[*\]+, (const double|double const) *\[*\]+, double *\[*\]+\[)\]+"
983 test_demangling "arm: g__FPfPCfT1" \
984 "g\[(\]+float *\[*\]+, (const float|float const) *\[*\]+, float *\[*\]+\[)\]+"
985
986 test_demangling "arm: g__FUlCUlT1" \
987 "g\[(\]+unsigned long, (const unsigned long|unsigned long const), unsigned long\[)\]+"
988 test_demangling "arm: g__FPlPClT1" \
989 "g\[(\]+long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
990 test_demangling "arm: g__FUiCUiT1" \
991 "g\[(\]+unsigned int, (const unsigned int|unsigned int const), unsigned int\[)\]+"
992 test_demangling "arm: g__FPiPCiT1" \
993 "g\[(\]+int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
994 test_demangling "arm: g__FUsCUsT1" \
995 "g\[(\]+unsigned short, (const unsigned short|unsigned short const), unsigned short\[)\]+"
996 test_demangling "arm: g__FPsPCsT1" \
997 "g\[(\]+short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
998 test_demangling "arm: g__FUcCUcT1" \
999 "g\[(\]+unsigned char, (const unsigned char|unsigned char const), unsigned char\[)\]+"
1000 test_demangling "arm: g__FPcPCcT1" \
1001 "g\[(\]+char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
1002 test_demangling "arm: g__F1TlClT2" \
1003 "g\[(\]+T, long, (const long|long const), long\[)\]+"
1004 test_demangling "arm: g__F1TiCiT2" \
1005 "g\[(\]+T, int, (const int|int const), int\[)\]+"
1006 test_demangling "arm: g__F1TsCsT2" \
1007 "g\[(\]+T, short, (const short|short const), short\[)\]+"
1008 test_demangling "arm: g__F1TcCcT2" \
1009 "g\[(\]+T, char, (const char|char const), char\[)\]+"
1010
1011 test_demangling_exact "arm: __dl__17T5__pt__8_PFcPv_iSFPv" "T5<int (*)(char, void *)>::operator delete(void *) static"
1012
1013 test_demangling "arm: printf__FPCce" \
1014 "printf\[(\]+(const char|char const) \[*\]+,...\[)\]+"
1015
1016 test_demangling_exact "arm: X__17T5__pt__8_PFcPv_i" "T5<int (*)(char, void *)>::X"
1017
1018 test_demangling_exact "arm: __ct__12T5__pt__3_1xFi" "T5<x>::T5(int)"
1019
1020 test_demangling "arm: g__F1SRUlRCUlT2" \
1021 "g\[(\]+S, unsigned long &, (const unsigned long|unsigned long const) &, unsigned long &\[)\]+"
1022 test_demangling "arm: g__F1SRPlRPClT2" \
1023 "g\[(\]+S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
1024 test_demangling "arm: g__F1RRUiRCUiT2" \
1025 "g\[(\]+R, unsigned int &, (const unsigned int|unsigned int const) &, unsigned int &\[)\]+"
1026 test_demangling "arm: g__F1SRPiRPCiT2" \
1027 "g\[(\]+S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
1028 test_demangling "arm: g__F1RRUsRCUsT2" \
1029 "g\[(\]+R, unsigned short &, (const unsigned short|unsigned short const) &, unsigned short &\[)\]+"
1030 test_demangling "arm: g__F1SRPsRPCsT2" \
1031 "g\[(\]+S, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
1032 test_demangling "arm: g__F1RRUcRCUcT2" \
1033 "g\[(\]+R, unsigned char &, (const unsigned char|unsigned char const) &, unsigned char &\[)\]+"
1034 test_demangling "arm: g__F1SRPcRPCcT2" \
1035 "g\[(\]+S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
1036 test_demangling "arm: g__F1T1RRlRClT3" \
1037 "g\[(\]+T, R, long &, (const long|long const) &, long &\[)\]+"
1038 test_demangling "arm: g__F1T1RRiRCiT3" \
1039 "g\[(\]+T, R, int &, (const int|int const) &, int &\[)\]+"
1040 test_demangling "arm: g__F1T1RRsRCsT3" \
1041 "g\[(\]+T, R, short &, (const short|short const) &, short &\[)\]+"
1042 test_demangling "arm: g__F1T1RRcRCcT3" \
1043 "g\[(\]+T, R, char &, (const char|char const) &, char &\[)\]+"
1044
1045 test_demangling_exact "arm: __dl__21T5__pt__11_PFiPPdPv_iSFPv" "T5<int (*)(int, double **, void *)>::operator delete(void *) static"
1046
1047 test_demangling_exact "arm: __std__foo" "global destructors keyed to foo"
1048
1049 test_demangling_exact "arm: __sti__bar" "global constructors keyed to bar"
1050
1051 test_demangling_exact "arm: f__FicdPcPFci_v" "f(int, char, double, char *, void (*)(char, int))"
1052 test_demangling_exact "arm: f__FicdPcPFic_v" "f(int, char, double, char *, void (*)(int, char))"
1053 test_demangling_exact "arm: get__2T7SFv" "T7::get(void) static"
1054
1055 test_demangling_exact "arm: X__21T5__pt__11_PFiPPdPv_i" "T5<int (*)(int, double **, void *)>::X"
1056
1057 test_demangling "arm: g__FcRdRCdT2" \
1058 "g\[(\]+char, double &, (const double|double const) &, double &\[)\]+"
1059 test_demangling "arm: g__FcRfRCfT2" \
1060 "g\[(\]+char, float &, (const float|float const) &, float &\[)\]+"
1061 test_demangling "arm: __md__FC2T2i" \
1062 "operator%\[(\]+(const T2|T2 const), int\[)\]+"
1063 test_demangling "arm: __dv__FC2T2i" \
1064 "operator/\[(\]+(const T2|T2 const), int\[)\]+"
1065 test_demangling "arm: __ml__FC2T2i" \
1066 "operator\[*\]+\[(\]+(const T2|T2 const), int\[)\]+"
1067 test_demangling "arm: __mi__FC2T2i" \
1068 "operator-\[(\]+(const T2|T2 const), int\[)\]+"
1069 test_demangling "arm: __pl__FC2T2i" \
1070 "operator\[+\]+\[(\]+(const T2|T2 const), int\[)\]+"
1071
1072 test_demangling_exact "arm: __dl__11T5__pt__2_iSFPv" "T5<int>::operator delete(void *) static"
1073
1074 test_demangling_exact "arm: __dl__11T5__pt__2_cSFPv" "T5<char>::operator delete(void *) static"
1075
1076 test_demangling_exact "arm: h__Fc" "h(char)"
1077 test_demangling_exact "arm: h__Fd" "h(double)"
1078 test_demangling_exact "arm: h__Ff" "h(float)"
1079 test_demangling_exact "arm: h__Fi" "h(int)"
1080 test_demangling_exact "arm: f__Fi" "f(int)"
1081 test_demangling_exact "arm: h__Fl" "h(long)"
1082
1083 test_demangling_exact "arm: h__Fs" "h(short)"
1084 test_demangling "arm: __md__FC2T2RC2T2" \
1085 "operator%\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1086 test_demangling "arm: __dv__FC2T2RC2T2" \
1087 "operator/\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1088 test_demangling "arm: __ml__FC2T2RC2T2" \
1089 "operator\[*\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1090 test_demangling "arm: __mi__FC2T2RC2T2" \
1091 "operator-\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1092 test_demangling "arm: __pl__FC2T2RC2T2" \
1093 "operator\[+\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1094 test_demangling "arm: g__FcRP1cRPC1cT2" \
1095 "g\[(\]+char, c *\[*\]+&, (const c|c const) *\[*\]+&, c *\[*\]+&\[)\]+"
1096
1097 test_demangling_exact "arm: X__11T5__pt__2_c" "T5<char>::X"
1098
1099 test_demangling_exact "arm: X__11T5__pt__2_i" "T5<int>::X"
1100
1101 test_demangling "arm: g__FdCdT1" \
1102 "g\[(\]+double, (const double|double const), double\[)\]+"
1103 test_demangling "arm: g__FfCfT1" \
1104 "g\[(\]+float, (const float|float const), float\[)\]+"
1105 test_demangling "arm: g__FlClT1" \
1106 "g\[(\]+long, (const long|long const), long\[)\]+"
1107 test_demangling "arm: g__FiCiT1" \
1108 "g\[(\]+int, (const int|int const), int\[)\]+"
1109 test_demangling "arm: g__FsCsT1" \
1110 "g\[(\]+short, (const short|short const), short\[)\]+"
1111 test_demangling "arm: g__FcCcT1" \
1112 "g\[(\]+char, (const char|char const), char\[)\]+"
1113
1114 test_demangling_exact "arm: __ct__17T5__pt__8_PFcPv_iFi" "T5<int (*)(char, void *)>::T5(int)"
1115
1116 test_demangling_exact "arm: f__FicdPc" "f(int, char, double, char *)"
1117 test_demangling_exact "arm: __nw__FUi" "operator new(unsigned int)"
1118 test_demangling_exact "arm: __ct__Q3_2T11a1bSFi" "T1::a::b::b(int) static"
1119 test_demangling_exact "arm: __dt__Q3_2T11a1bSFi" "T1::a::b::~b(int) static"
1120 test_demangling_exact "arm: put__Q3_2T11a1bSFi" "T1::a::b::put(int) static"
1121 test_demangling_exact "arm: get__Q2_2T11aSFv" "T1::a::get(void) static"
1122 test_demangling_exact "arm: put__2T1SFi" "T1::put(int) static"
1123 test_demangling_exact "arm: put__Q5_2T11a1b1c1dSFi" "T1::a::b::c::d::put(int) static"
1124 test_demangling_exact "arm: get__Q4_2T11a1b1cSFv" "T1::a::b::c::get(void) static"
1125 test_demangling_exact "arm: put__Q2_2T11aSFi" "T1::a::put(int) static"
1126 test_demangling_exact "arm: put__Q4_2T11a1b1cSFi" "T1::a::b::c::put(int) static"
1127 test_demangling_exact "arm: get__Q3_2T11a1bSFv" "T1::a::b::get(void) static"
1128 test_demangling_exact "arm: get__2T1SFv" "T1::get(void) static"
1129 test_demangling_exact "arm: get__Q5_2T11a1b1c1dSFv" "T1::a::b::c::d::get(void) static"
1130
1131 test_demangling_exact "arm: __dt__11T1__pt__2_cFv" "T1<char>::~T1(void)"
1132
1133 test_demangling_exact "arm: __dt__12T1__pt__3_1tFv" "T1<t>::~T1(void)"
1134
1135 test_demangling_exact "arm: __dl__12T1__pt__3_1tSFPv" "T1<t>::operator delete(void *) static"
1136
1137 test_demangling_exact "arm: __ct__11T1__pt__2_cFi" "T1<char>::T1(int)"
1138
1139 test_demangling_exact "arm: __ct__11T1__pt__2_cFv" "T1<char>::T1(void)"
1140
1141 test_demangling_exact "arm: __ct__12T1__pt__3_1tFi" "T1<t>::T1(int)"
1142
1143 test_demangling_exact "arm: __ct__12T1__pt__3_1tFv" "T1<t>::T1(void)"
1144
1145 test_demangling_exact "arm: __dl__11T1__pt__2_cSFPv" "T1<char>::operator delete(void *) static"
1146
1147 test_demangling_exact "arm: bar__3fooFPv" "foo::bar(void *)"
1148 test_demangling "arm: bar__3fooFPCv" \
1149 "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+"
1150 test_demangling_exact "arm: bar__3fooCFPv" "foo::bar(void *) const"
1151 test_demangling "arm: bar__3fooCFPCv" \
1152 "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+ const"
1153 test_demangling_exact "arm: __eq__3fooFR3foo" "foo::operator==(foo &)"
1154 test_demangling "arm: __eq__3fooFRC3foo" \
1155 "foo::operator==\[(\]+(const foo|foo const) &\[)\]+"
1156 test_demangling_exact "arm: __eq__3fooCFR3foo" "foo::operator==(foo &) const"
1157 test_demangling "arm: __eq__3fooCFRC3foo" \
1158 "foo::operator==\[(\]+(const foo|foo const) &\[)\]+ const"
1159
1160 test_demangling_exact "arm: elem__15vector__pt__2_dFi" "vector<double>::elem(int)"
1161
1162 test_demangling_exact "arm: elem__15vector__pt__2_iFi" "vector<int>::elem(int)"
1163
1164 test_demangling_exact "arm: __ct__15vector__pt__2_dFi" "vector<double>::vector(int)"
1165
1166 test_demangling_exact "arm: __ct__15vector__pt__2_iFi" "vector<int>::vector(int)"
1167
1168 test_demangling_exact "arm: __ct__25DListNode__pt__9_R6RLabelFR6RLabelP25DListNode__pt__9_R6RLabelT2" \
1169 "DListNode<RLabel &>::DListNode(RLabel &, DListNode<RLabel &> *, DListNode<RLabel &> *)"
1170
1171 test_demangling_exact "arm: bar__3fooFiT16FooBar" "foo::bar(int, int, FooBar)"
1172
1173 test_demangling_exact "arm: bar__3fooFPiN51PdN37PcN211T1iN215" \
1174 "foo::bar(int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, char *, char *, char *, int *, int, int, int)"
1175
1176 test_demangling_exact "arm: _Utf390_1__1_9223372036854775807__9223372036854775" \
1177 "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
1178 }
1179
1180 proc test_hp_style_demangling {} {
1181
1182 # HP aCC mangling style is based on ARM for all the basic stuff,
1183 # so first we use some of the ARM tests here. Later we have HP-specific
1184 # tests.
1185
1186 test_demangling "hp: g__FP1cPC1cT1" \
1187 "g\[(\]+c *\[*\]+, (const c|c const) *\[*\]+, c *\[*\]+\[)\]+"
1188 test_demangling "hp: g__FPUlPCUlT1" \
1189 "g\[(\]+unsigned long \[*\]+, (const unsigned long|unsigned long const) \[*\]+, unsigned long \[*\]+\[)\]+"
1190 test_demangling "hp: g__FPUiPCUiT1" \
1191 "g\[(\]+unsigned int \[*\]+, (const unsigned int|unsigned int const) \[*\]+, unsigned int \[*\]+\[)\]+"
1192 test_demangling "hp: g__FPUsPCUsT1" \
1193 "g\[(\]+unsigned short \[*\]+, (const unsigned short|unsigned short const) \[*\]+, unsigned short \[*\]+\[)\]+"
1194 test_demangling "hp: g__FPUcPCUcT1" \
1195 "g\[(\]+unsigned char \[*\]+, (const unsigned char|unsigned char const) \[*\]+, unsigned char \[*\]+\[)\]+"
1196 test_demangling "hp: g__F1TPlPClT2" \
1197 "g\[(\]+T, long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
1198 test_demangling "hp: g__F1RRlRClT2" \
1199 "g\[(\]+R, long &, (const long|long const) &, long &\[)\]+"
1200 test_demangling "hp: g__F1TPiPCiT2" \
1201 "g\[(\]+T, int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
1202 test_demangling "hp: g__F1RRiRCiT2" \
1203 "g\[(\]+R, int &, (const int|int const) &, int &\[)\]+"
1204 test_demangling "hp: g__F1TPsPCsT2" \
1205 "g\[(\]+T, short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
1206 test_demangling "hp: g__F1RRsRCsT2" \
1207 "g\[(\]+R, short &, (const short|short const) &, short &\[)\]+"
1208 test_demangling "hp: g__F1TPcPCcT2" \
1209 "g\[(\]+T, char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
1210 test_demangling "hp: g__F1RRcRCcT2" \
1211 "g\[(\]+R, char &, (const char|char const) &, char &\[)\]+"
1212
1213 test_demangling "hp: __gt__FRC2T2c" \
1214 "operator>\[(\]+(const T2|T2 const) &, char\[)\]+"
1215 test_demangling "hp: __ge__FRC2T2c" \
1216 "operator>=\[(\]+(const T2|T2 const) &, char\[)\]+"
1217 test_demangling "hp: __lt__FRC2T2c" \
1218 "operator<\[(\]+(const T2|T2 const) &, char\[)\]+"
1219
1220 test_demangling "hp: __le__FRC2T2c" \
1221 "operator<=\[(\]+(const T2|T2 const) &, char\[)\]+"
1222 test_demangling "hp: __ne__FRC2T2c" \
1223 "operator!=\[(\]+(const T2|T2 const) &, char\[)\]+"
1224 test_demangling "hp: __eq__FRC2T2c" \
1225 "operator==\[(\]+(const T2|T2 const) &, char\[)\]+"
1226 test_demangling_exact "hp: __amd__FR2T2i" "operator%=(T2 &, int)"
1227 test_demangling_exact "hp: __adv__FR2T2i" "operator/=(T2 &, int)"
1228 test_demangling_exact "hp: __amu__FR2T2i" "operator*=(T2 &, int)"
1229 test_demangling_exact "hp: __ami__FR2T2i" "operator-=(T2 &, int)"
1230 test_demangling_exact "hp: __apl__FR2T2i" "operator+=(T2 &, int)"
1231 test_demangling_exact "hp: __nw__2T1SFUi" "T1::operator new(unsigned int) static"
1232 test_demangling_exact "hp: __dl__2T1SFPv" "T1::operator delete(void *) static"
1233 test_demangling_exact "hp: put__2T7SFi" "T7::put(int) static"
1234
1235 test_demangling_exact "hp: h__FUc" "h(unsigned char)"
1236 test_demangling_exact "hp: f__Fic" "f(int, char)"
1237 test_demangling_exact "hp: h__FUi" "h(unsigned int)"
1238 test_demangling_exact "hp: h__Fci" "h(char, int)"
1239 test_demangling_exact "hp: h__FUl" "h(unsigned long)"
1240 test_demangling_exact "hp: h__Fcl" "h(char, long)"
1241 test_demangling_exact "hp: h__FUs" "h(unsigned short)"
1242 test_demangling_exact "hp: h__Fcs" "h(char, short)"
1243 test_demangling "hp: __amd__FR2T2RC2T2" \
1244 "operator%=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
1245 test_demangling "hp: __adv__FR2T2RC2T2" \
1246 "operator/=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
1247 test_demangling "hp: __amu__FR2T2RC2T2" \
1248 "operator\[*\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
1249 test_demangling "hp: __ami__FR2T2RC2T2" \
1250 "operator-=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
1251 test_demangling "hp: __apl__FR2T2RC2T2" \
1252 "operator\[+\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
1253
1254 test_demangling "hp: g__F1SRPUlRPCUlT2" \
1255 "g\[(\]+S, unsigned long \[*\]+&, (const unsigned long|unsigned long const) \[*\]+&, unsigned long \[*\]+&\[)\]+"
1256 test_demangling "hp: g__F1SRPUiRPCUiT2" \
1257 "g\[(\]+S, unsigned int \[*\]+&, (const unsigned int|unsigned int const) \[*\]+&, unsigned int \[*\]+&\[)\]+"
1258 test_demangling "hp: g__F1SRPUsRPCUsT2" \
1259 "g\[(\]+S, unsigned short \[*\]+&, (const unsigned short|unsigned short const) \[*\]+&, unsigned short \[*\]+&\[)\]+"
1260 test_demangling "hp: g__F1SRPUcRPCUcT2" \
1261 "g\[(\]+S, unsigned char \[*\]+&, (const unsigned char|unsigned char const) \[*\]+&, unsigned char \[*\]+&\[)\]+"
1262 test_demangling "hp: g__F1T1SRPlRPClT3" \
1263 "g\[(\]+T, S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
1264 test_demangling "hp: g__F1T1SRPiRPCiT3" \
1265 "g\[(\]+T, S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
1266 test_demangling "hp: g__F1T1SRPcRPCcT3" \
1267 "g\[(\]+T, S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
1268
1269
1270 test_demangling "hp: __gt__FRC2T2T1" \
1271 "operator>\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
1272 test_demangling "hp: __ge__FRC2T2T1" \
1273 "operator>=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
1274 test_demangling "hp: __lt__FRC2T2T1" \
1275 "operator<\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
1276 test_demangling "hp: __le__FRC2T2T1" \
1277 "operator<=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
1278 test_demangling "hp: __ne__FRC2T2T1" \
1279 "operator!=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
1280 test_demangling "hp: __eq__FRC2T2T1" \
1281 "operator==\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
1282 test_demangling "hp: g__FcR1cRC1cT2" \
1283 "g\[(\]+char, c &, (const c|c const) &, c &\[)\]+"
1284 test_demangling "hp: g__FcRPdRPCdT2" \
1285 "g\[(\]+char, double *\[*\]+&, (const double|double const) *\[*\]+&, double *\[*\]+&\[)\]+"
1286 test_demangling "hp: g__FcRPfRPCfT2" \
1287 "g\[(\]+char, float *\[*\]+&, (const float|float const) *\[*\]+&, float *\[*\]+&\[)\]+"
1288 test_demangling_exact "hp: h__FcT1" "h(char, char)"
1289 test_demangling_exact "hp: f__Ficd" "f(int, char, double)"
1290 test_demangling "hp: g__F1T1SdRPsRPCsT4" \
1291 "g\[(\]+T, S, double, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
1292 test_demangling "hp: g__F1cC1cT1" \
1293 "g\[(\]+c, (const c|c const), c\[)\]+"
1294 test_demangling "hp: g__FPdPCdT1" \
1295 "g\[(\]+double *\[*\]+, (const double|double const) *\[*\]+, double *\[*\]+\[)\]+"
1296 test_demangling "hp: g__FPfPCfT1" \
1297 "g\[(\]+float *\[*\]+, (const float|float const) *\[*\]+, float *\[*\]+\[)\]+"
1298
1299 test_demangling "hp: g__FUlCUlT1" \
1300 "g\[(\]+unsigned long, (const unsigned long|unsigned long const), unsigned long\[)\]+"
1301 test_demangling "hp: g__FPlPClT1" \
1302 "g\[(\]+long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
1303 test_demangling "hp: g__FUiCUiT1" \
1304 "g\[(\]+unsigned int, (const unsigned int|unsigned int const), unsigned int\[)\]+"
1305 test_demangling "hp: g__FPiPCiT1" \
1306 "g\[(\]+int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
1307 test_demangling "hp: g__FUsCUsT1" \
1308 "g\[(\]+unsigned short, (const unsigned short|unsigned short const), unsigned short\[)\]+"
1309 test_demangling "hp: g__FPsPCsT1" \
1310 "g\[(\]+short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
1311 test_demangling "hp: g__FUcCUcT1" \
1312 "g\[(\]+unsigned char, (const unsigned char|unsigned char const), unsigned char\[)\]+"
1313 test_demangling "hp: g__FPcPCcT1" \
1314 "g\[(\]+char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
1315 test_demangling "hp: g__F1TlClT2" \
1316 "g\[(\]+T, long, (const long|long const), long\[)\]+"
1317 test_demangling "hp: g__F1TiCiT2" \
1318 "g\[(\]+T, int, (const int|int const), int\[)\]+"
1319 test_demangling "hp: g__F1TsCsT2" \
1320 "g\[(\]+T, short, (const short|short const), short\[)\]+"
1321 test_demangling "hp: g__F1TcCcT2" \
1322 "g\[(\]+T, char, (const char|char const), char\[)\]+"
1323
1324 test_demangling "hp: printf__FPCce" \
1325 "printf\[(\]+(const char|char const) \[*\]+,...\[)\]+"
1326
1327
1328 test_demangling "hp: g__F1SRUlRCUlT2" \
1329 "g\[(\]+S, unsigned long &, (const unsigned long|unsigned long const) &, unsigned long &\[)\]+"
1330 test_demangling "hp: g__F1SRPlRPClT2" \
1331 "g\[(\]+S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
1332 test_demangling "hp: g__F1RRUiRCUiT2" \
1333 "g\[(\]+R, unsigned int &, (const unsigned int|unsigned int const) &, unsigned int &\[)\]+"
1334 test_demangling "hp: g__F1SRPiRPCiT2" \
1335 "g\[(\]+S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
1336 test_demangling "hp: g__F1RRUsRCUsT2" \
1337 "g\[(\]+R, unsigned short &, (const unsigned short|unsigned short const) &, unsigned short &\[)\]+"
1338 test_demangling "hp: g__F1SRPsRPCsT2" \
1339 "g\[(\]+S, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
1340 test_demangling "hp: g__F1RRUcRCUcT2" \
1341 "g\[(\]+R, unsigned char &, (const unsigned char|unsigned char const) &, unsigned char &\[)\]+"
1342 test_demangling "hp: g__F1SRPcRPCcT2" \
1343 "g\[(\]+S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
1344 test_demangling "hp: g__F1T1RRlRClT3" \
1345 "g\[(\]+T, R, long &, (const long|long const) &, long &\[)\]+"
1346 test_demangling "hp: g__F1T1RRiRCiT3" \
1347 "g\[(\]+T, R, int &, (const int|int const) &, int &\[)\]+"
1348 test_demangling "hp: g__F1T1RRsRCsT3" \
1349 "g\[(\]+T, R, short &, (const short|short const) &, short &\[)\]+"
1350 test_demangling "hp: g__F1T1RRcRCcT3" \
1351 "g\[(\]+T, R, char &, (const char|char const) &, char &\[)\]+"
1352
1353
1354 test_demangling_exact "hp: f__FicdPcPFci_v" "f(int, char, double, char *, void (*)(char, int))"
1355 test_demangling_exact "hp: f__FicdPcPFic_v" "f(int, char, double, char *, void (*)(int, char))"
1356 test_demangling_exact "hp: get__2T7SFv" "T7::get(void) static"
1357
1358
1359 test_demangling "hp: g__FcRdRCdT2" \
1360 "g\[(\]+char, double &, (const double|double const) &, double &\[)\]+"
1361 test_demangling "hp: g__FcRfRCfT2" \
1362 "g\[(\]+char, float &, (const float|float const) &, float &\[)\]+"
1363 test_demangling "hp: __md__FC2T2i" \
1364 "operator%\[(\]+(const T2|T2 const), int\[)\]+"
1365 test_demangling "hp: __dv__FC2T2i" \
1366 "operator/\[(\]+(const T2|T2 const), int\[)\]+"
1367 test_demangling "hp: __ml__FC2T2i" \
1368 "operator\[*\]+\[(\]+(const T2|T2 const), int\[)\]+"
1369 test_demangling "hp: __mi__FC2T2i" \
1370 "operator-\[(\]+(const T2|T2 const), int\[)\]+"
1371 test_demangling "hp: __pl__FC2T2i" \
1372 "operator\[+\]+\[(\]+(const T2|T2 const), int\[)\]+"
1373
1374
1375 test_demangling_exact "hp: h__Fc" "h(char)"
1376 test_demangling_exact "hp: h__Fd" "h(double)"
1377 test_demangling_exact "hp: h__Ff" "h(float)"
1378 test_demangling_exact "hp: h__Fi" "h(int)"
1379 test_demangling_exact "hp: f__Fi" "f(int)"
1380 test_demangling_exact "hp: h__Fl" "h(long)"
1381
1382 test_demangling_exact "hp: h__Fs" "h(short)"
1383 test_demangling "hp: __md__FC2T2RC2T2" \
1384 "operator%\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1385 test_demangling "hp: __dv__FC2T2RC2T2" \
1386 "operator/\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1387 test_demangling "hp: __ml__FC2T2RC2T2" \
1388 "operator\[*\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1389 test_demangling "hp: __mi__FC2T2RC2T2" \
1390 "operator-\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1391 test_demangling "hp: __pl__FC2T2RC2T2" \
1392 "operator\[+\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
1393 test_demangling "hp: g__FcRP1cRPC1cT2" \
1394 "g\[(\]+char, c *\[*\]+&, (const c|c const) *\[*\]+&, c *\[*\]+&\[)\]+"
1395
1396
1397 test_demangling "hp: g__FdCdT1" \
1398 "g\[(\]+double, (const double|double const), double\[)\]+"
1399 test_demangling "hp: g__FfCfT1" \
1400 "g\[(\]+float, (const float|float const), float\[)\]+"
1401 test_demangling "hp: g__FlClT1" \
1402 "g\[(\]+long, (const long|long const), long\[)\]+"
1403 test_demangling "hp: g__FiCiT1" \
1404 "g\[(\]+int, (const int|int const), int\[)\]+"
1405 test_demangling "hp: g__FsCsT1" \
1406 "g\[(\]+short, (const short|short const), short\[)\]+"
1407 test_demangling "hp: g__FcCcT1" \
1408 "g\[(\]+char, (const char|char const), char\[)\]+"
1409
1410
1411 test_demangling_exact "hp: f__FicdPc" "f(int, char, double, char *)"
1412 test_demangling_exact "hp: __nw__FUi" "operator new(unsigned int)"
1413 test_demangling_exact "hp: __ct__Q3_2T11a1bSFi" "T1::a::b::b(int) static"
1414 test_demangling_exact "hp: __dt__Q3_2T11a1bSFi" "T1::a::b::~b(int) static"
1415 test_demangling_exact "hp: put__Q3_2T11a1bSFi" "T1::a::b::put(int) static"
1416 test_demangling_exact "hp: get__Q2_2T11aSFv" "T1::a::get(void) static"
1417 test_demangling_exact "hp: put__2T1SFi" "T1::put(int) static"
1418 test_demangling_exact "hp: put__Q5_2T11a1b1c1dSFi" "T1::a::b::c::d::put(int) static"
1419 test_demangling_exact "hp: get__Q4_2T11a1b1cSFv" "T1::a::b::c::get(void) static"
1420 test_demangling_exact "hp: put__Q2_2T11aSFi" "T1::a::put(int) static"
1421 test_demangling_exact "hp: put__Q4_2T11a1b1cSFi" "T1::a::b::c::put(int) static"
1422 test_demangling_exact "hp: get__Q3_2T11a1bSFv" "T1::a::b::get(void) static"
1423 test_demangling_exact "hp: get__2T1SFv" "T1::get(void) static"
1424 test_demangling_exact "hp: get__Q5_2T11a1b1c1dSFv" "T1::a::b::c::d::get(void) static"
1425
1426
1427 test_demangling_exact "hp: bar__3fooFPv" "foo::bar(void *)"
1428 test_demangling "hp: bar__3fooFPCv" \
1429 "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+"
1430 test_demangling_exact "hp: bar__3fooCFPv" "foo::bar(void *) const"
1431 test_demangling "hp: bar__3fooCFPCv" \
1432 "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+ const"
1433 test_demangling_exact "hp: __eq__3fooFR3foo" "foo::operator==(foo &)"
1434 test_demangling "hp: __eq__3fooFRC3foo" \
1435 "foo::operator==\[(\]+(const foo|foo const) &\[)\]+"
1436 test_demangling_exact "hp: __eq__3fooCFR3foo" "foo::operator==(foo &) const"
1437 test_demangling "hp: __eq__3fooCFRC3foo" \
1438 "foo::operator==\[(\]+(const foo|foo const) &\[)\]+ const"
1439
1440 test_demangling_exact "hp: bar__3fooFiT16FooBar" "foo::bar(int, int, FooBar)"
1441
1442 test_demangling_exact "hp: bar__3fooFPiN51PdN37PcN211T1iN215" \
1443 "foo::bar(int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, char *, char *, char *, int *, int, int, int)"
1444
1445
1446 # HP aCC specific tests. HP aCC demangling does not use __pt__ for
1447 # template specifications. There are other differences as well.
1448
1449 test_demangling_exact "hp: __dt__2T5XTPFiPPdPv_i__Fv" "T5<int (*)(int, double **, void *)>::~T5(void)"
1450
1451 test_demangling_exact "hp: __ct__1cFi" "c::c(int)"
1452
1453 test_demangling_exact "hp: __dt__2T5XTi__Fv" "T5<int>::~T5(void)"
1454
1455 test_demangling_exact "hp: __dt__2T5XTc__Fv" "T5<char>::~T5(void)"
1456
1457 test_demangling_exact "hp: __ct__2T2Fi" "T2::T2(int)"
1458 test_demangling_exact "hp: __dt__2T1Fv" "T1::~T1(void)"
1459
1460 test_demangling_exact "hp: __dt__2T5XT1x__Fv" "T5<x>::~T5(void)"
1461
1462 test_demangling_exact "hp: __dt__2T5XTPFcPv_i__Fv" "T5<int (*)(char, void *)>::~T5(void)"
1463
1464 test_demangling_exact "hp: __ct__2T5XTPFiPPdPv_i__Fi" "T5<int (*)(int, double **, void *)>::T5(int)"
1465
1466 test_demangling_exact "hp: __dl__2T5XT1x__SFPv" "T5<x>::operator delete(void *) static"
1467
1468 test_demangling_exact "hp: X__2T5XT1x" "T5<x>::X"
1469
1470 test_demangling_exact "hp: __ct__2T5XTi__Fi" "T5<int>::T5(int)"
1471
1472 test_demangling_exact "hp: __ct__2T5XTc__Fi" "T5<char>::T5(int)"
1473
1474 test_demangling_exact "hp: __dl__2T5XTPFcPv_i__SFPv" "T5<int (*)(char, void *)>::operator delete(void *) static"
1475
1476 test_demangling_exact "hp: X__2T5XTPFcPv_i" "T5<int (*)(char, void *)>::X"
1477
1478 test_demangling_exact "hp: __ct__2T5XT1x__Fi" "T5<x>::T5(int)"
1479
1480 test_demangling_exact "hp: __dl__2T5XTPFiPPdPv_i__SFPv" "T5<int (*)(int, double **, void *)>::operator delete(void *) static"
1481 test_demangling_exact "hp: X__2T5XTPFiPPdPv_i" "T5<int (*)(int, double **, void *)>::X"
1482
1483 test_demangling_exact "hp: __dl__2T5XTi__SFPv" "T5<int>::operator delete(void *) static"
1484
1485 test_demangling_exact "hp: __dl__2T5XTc__SFPv" "T5<char>::operator delete(void *) static"
1486
1487 test_demangling_exact "hp: X__2T5XTc" "T5<char>::X"
1488
1489 test_demangling_exact "hp: X__2T5XTi" "T5<int>::X"
1490
1491 test_demangling_exact "hp: __ct__2T5XTPFcPv_i__Fi" "T5<int (*)(char, void *)>::T5(int)"
1492
1493 test_demangling_exact "hp: __dt__2T1XTc__Fv" "T1<char>::~T1(void)"
1494
1495 test_demangling_exact "hp: __dt__2T1XT1t__Fv" "T1<t>::~T1(void)"
1496
1497 test_demangling_exact "hp: __dl__2T1XT1t__SFPv" "T1<t>::operator delete(void *) static"
1498
1499 test_demangling_exact "hp: __ct__2T1XTc__Fi" "T1<char>::T1(int)"
1500
1501 test_demangling_exact "hp: __ct__2T1XTc__Fv" "T1<char>::T1(void)"
1502
1503 test_demangling_exact "hp: __ct__2T1XT1t__Fi" "T1<t>::T1(int)"
1504
1505 test_demangling_exact "hp: __ct__2T1XT1t__Fv" "T1<t>::T1(void)"
1506
1507 test_demangling_exact "hp: __dl__2T1XTc__SFPv" "T1<char>::operator delete(void *) static"
1508
1509 test_demangling_exact "hp: elem__6vectorXTd__Fi" "vector<double>::elem(int)"
1510
1511 test_demangling_exact "hp: elem__6vectorXTi__Fi" "vector<int>::elem(int)"
1512
1513 test_demangling_exact "hp: __ct__6vectorXTd__Fi" "vector<double>::vector(int)"
1514
1515 test_demangling_exact "hp: __ct__6vectorXTi__Fi" "vector<int>::vector(int)"
1516
1517 test_demangling_exact "hp: __ct__9DListNodeXTR6RLabel__FR6RLabelP9DListNodeXTR6RLabel_T2" \
1518 "DListNode<RLabel &>::DListNode(RLabel &, DListNode<RLabel &> *, DListNode<RLabel &> *)"
1519
1520
1521 # Absolute integer constants in template args
1522
1523 test_demangling_exact "hp: elem__6vectorXTiUP34__Fi" "vector<int,34U>::elem(int)"
1524 test_demangling_exact "hp: elem__6vectorXUP2701Td__Fi" "vector<2701U,double>::elem(int)"
1525 test_demangling_exact "hp: elem__6vectorXTiSP334__Fi" "vector<int,334>::elem(int)"
1526 test_demangling_exact "hp: elem__6vectorXTiSN67__Fi" "vector<int,-67>::elem(int)"
1527 test_demangling_exact "hp: elem__6vectorXTiSM__SCFPPd" "vector<int,-2147483648>::elem(double **) static const"
1528 test_demangling_exact "hp: elem__6vectorXTiSN67UP4000TRs__Fi" "vector<int,-67,4000U,short &>::elem(int)"
1529 test_demangling_exact "hp: elem__6vectorXTiSN67TRdTFPv_i__Fi" "vector<int,-67,double &,int (void *)>::elem(int)"
1530 test_demangling_exact "hp: X__6vectorXTiSN67TdTPvUP5TRs" "vector<int,-67,double,void *,5U,short &>::X"
1531
1532 # Named constants in template args
1533
1534 test_demangling_exact "hp: elem__6vectorXTiA3foo__Fi" "vector<int,&foo>::elem(int)"
1535 test_demangling_exact "hp: elem__6vectorXTiA3fooTPvA5Label__FiPPvT2" "vector<int,&foo,void *,&Label>::elem(int, void **, void **)"
1536 test_demangling_exact "hp: elem__6vectorXTiSN42A3foo__Fi" "vector<int,-42,&foo>::elem(int)"
1537
1538 # Alternate entry points for functions
1539
1540 test_demangling_exact "hp: __ct__2T5XTPFcPv_i__Fi_2" "T5<int (*)(char, void *)>::T5(int)"
1541 test_demangling_exact "hp: __ct__2T5XTPFcPv_i__Fi_19" "T5<int (*)(char, void *)>::T5(int)"
1542 test_demangling_exact "hp: f__FicdPcPFci_v_34" "f(int, char, double, char *, void (*)(char, int))"
1543
1544
1545 # Template partial specializations
1546
1547 # FIXME! The # characters don't go through expect, and backslashes don't seem to work.
1548 # test_demangling_exact "hp: spec__13Spec<#1,#1.*>XTiTPi_FPi" "Spec<int,int *>::spec(int *)"
1549 # test_demangling_exact "hp: spec__16Spec<#1,#1.&,#1>XTiTRiTi_FPi" "Spec<int,int &, int>::spec(int *)"
1550 # Fake test -- replace # with %
1551 test_demangling_exact "hp: spec__13Spec<%1,%1.*>XTiTPi_FPi" "Spec<int,int *>::spec(int *)"
1552 test_demangling_exact "hp: spec__16Spec<%1,%1.&,%1>XTiTRiTi_FPi" "Spec<int,int &,int>::spec(int *)"
1553
1554 # Global template functions
1555
1556 test_demangling_exact "hp: add__XTc_FcT1" "add<char>(char, char)"
1557 test_demangling_exact "hp: add__XTcSP9A5label_FcPPlT1" "add<char,9,&label>(char, long **, char)"
1558 test_demangling_exact "hp: add__XTPfTFPd_f_FcT1" "add<float *,float (double *)>(char, char)"
1559
1560 # Template for template arg
1561
1562 test_demangling_exact "hp: unLink__12basic_stringXTcT18string_char_traitsXTc_T9allocator_Fv" "basic_string<char,string_char_traits<char>,allocator>::unLink(void)"
1563
1564 test_demangling_exact "hp: _Utf390_1__1_9223372036854775807__9223372036854775" \
1565 "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
1566 }
1567
1568
1569 proc catch_demangling_errors {command} {
1570 if {[catch $command result]} {
1571 puts "ERROR: demangle.exp: while running $command: $result"
1572 }
1573 }
1574
1575 # Test support for different demangling styles. Note that this does
1576 # not depend upon running the test program and does not depend upon
1577 # gdb being able to lookup any C++ symbols. It simply calls the
1578 # internal demangler with synthesized strings and tests the results.
1579
1580 proc do_tests {} {
1581 global subdir
1582 global gdb_prompt
1583
1584
1585 # Start with a fresh gdb.
1586
1587 gdb_exit
1588 gdb_start
1589
1590 gdb_test_no_output "set language c++"
1591 gdb_test_no_output "set width 0"
1592
1593 # Using catch_demangling_errors this way ensures that, if one of
1594 # the functions raises a Tcl error, then it'll get reported, and
1595 # the rest of the functions will still run.
1596 catch_demangling_errors test_lucid_style_demangling
1597 catch_demangling_errors test_gnu_style_demangling
1598 catch_demangling_errors test_arm_style_demangling
1599 catch_demangling_errors test_hp_style_demangling
1600
1601 # Verify specifying demangle language.
1602 gdb_test_no_output "set language unknown"
1603 set_demangling_style "auto"
1604 gdb_test_exact "demangle -l c++ -- _ZSt4cout" "std::cout"
1605 gdb_test_exact "demangle -l c++ _ZSt4cout" "std::cout"
1606 gdb_test_exact "demangle -l c -- _ZSt4cout" "Can't demangle \"_ZSt4cout\""
1607 gdb_test_exact "demangle -l garbage xyzdje" "Unknown language \"garbage\""
1608 }
1609
1610 do_tests
This page took 0.065295 seconds and 4 git commands to generate.