forked from Imagelibrary/binutils-gdb
gdb/
Fix internal error on canonicalization of clang types. * cp-name-parser.y (operator): New comment at make_operator call for new, delete, new[] and delete[]. (exp): Use "sizeof ". Add new comment at make_operator call. gdb/testsuite/ Fix internal error on canonicalization of clang types. * gdb.dwarf2/dw2-canonicalize-type.S: New file. * gdb.dwarf2/dw2-canonicalize-type.exp: New file. * lib/gdb.exp (gdb_file_cmd): Catch also GDB internal error.
This commit is contained in:
@@ -446,13 +446,29 @@ demangler_special
|
||||
;
|
||||
|
||||
operator : OPERATOR NEW
|
||||
{ $$ = make_operator ("new", 3); }
|
||||
{
|
||||
/* Match the whitespacing of cplus_demangle_operators.
|
||||
It would abort on unrecognized string otherwise. */
|
||||
$$ = make_operator ("new", 3);
|
||||
}
|
||||
| OPERATOR DELETE
|
||||
{ $$ = make_operator ("delete ", 1); }
|
||||
{
|
||||
/* Match the whitespacing of cplus_demangle_operators.
|
||||
It would abort on unrecognized string otherwise. */
|
||||
$$ = make_operator ("delete ", 1);
|
||||
}
|
||||
| OPERATOR NEW '[' ']'
|
||||
{ $$ = make_operator ("new[]", 3); }
|
||||
{
|
||||
/* Match the whitespacing of cplus_demangle_operators.
|
||||
It would abort on unrecognized string otherwise. */
|
||||
$$ = make_operator ("new[]", 3);
|
||||
}
|
||||
| OPERATOR DELETE '[' ']'
|
||||
{ $$ = make_operator ("delete[] ", 1); }
|
||||
{
|
||||
/* Match the whitespacing of cplus_demangle_operators.
|
||||
It would abort on unrecognized string otherwise. */
|
||||
$$ = make_operator ("delete[] ", 1);
|
||||
}
|
||||
| OPERATOR '+'
|
||||
{ $$ = make_operator ("+", 2); }
|
||||
| OPERATOR '-'
|
||||
@@ -1183,7 +1199,11 @@ exp : FLOAT
|
||||
;
|
||||
|
||||
exp : SIZEOF '(' type ')' %prec UNARY
|
||||
{ $$ = d_unary ("sizeof", $3); }
|
||||
{
|
||||
/* Match the whitespacing of cplus_demangle_operators.
|
||||
It would abort on unrecognized string otherwise. */
|
||||
$$ = d_unary ("sizeof ", $3);
|
||||
}
|
||||
;
|
||||
|
||||
/* C++. */
|
||||
|
||||
Reference in New Issue
Block a user