aboutsummaryrefslogtreecommitdiff
path: root/libiberty/testsuite/d-demangle-expected
AgeCommit message (Collapse)AuthorFilesLines
2024-04-02libiberty: Invoke D demangler when --format=autoTom Tromey1-0/+5
Investigating GDB PR d/31580 showed that the libiberty demangler doesn't automatically demangle D mangled names. However, I think it should -- like C++ and Rust (new-style), D mangled names are readily distinguished by the leading "_D", and so the likelihood of confusion is low. The other non-"auto" cases in this code are Ada (where the encoded form could more easily be confused by ordinary programs) and Java (which is long gone, but which also shared the C++ mangling and thus was just an output style preference). This patch also fixed another GDB bug, though of course that part won't apply to the GCC repository. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31580 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30276 libiberty * cplus-dem.c (cplus_demangle): Try the D demangler with "auto" format. * testsuite/d-demangle-expected: Add --format=auto test.
2022-01-13Synchronize binutils libiberty sources with gcc version.Nick Clifton1-1/+57
+2021-12-30 Lancelot SIX <lsix@lancelotsix.com> + + * cp-demangle.c (d_clone_suffix): Support digits in clone tag + names. + * testsuite/demangle-expected: Check demangling of clone symbols + with digits in name. + +2021-12-16 H.J. Lu <hjl.tools@gmail.com> + + Revert: + 2021-12-16 H.J. Lu <hjl.tools@gmail.com> + + * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ + (RANLIB): Add @RANLIB_PLUGIN_OPTION@. + (configure_deps): Depend on ../config/gcc-plugin.m4. + * configure.ac: AC_SUBST AR_PLUGIN_OPTION and + RANLIB_PLUGIN_OPTION. + * aclocal.m4: Regenerated. + * configure: Likewise. + +2021-12-15 H.J. Lu <hjl.tools@gmail.com> + + * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ + (RANLIB): Add @RANLIB_PLUGIN_OPTION@. + (configure_deps): Depend on ../config/gcc-plugin.m4. + * configure.ac: AC_SUBST AR_PLUGIN_OPTION and + RANLIB_PLUGIN_OPTION. + * aclocal.m4: Regenerated. + * configure: Likewise. + +2021-11-29 Eric Gallager <egallager@gcc.gnu.org> + + PR other/103021 + * Makefile.in: Use ETAGS variable in TAGS target. + * configure: Regenerate. + * configure.ac: Allow ETAGS variable to be overridden. + +2021-11-29 Andrew Pinski <apinski@marvell.com> + + * make-temp-file.c (try_dir): Check to see if the dir + is actually a directory. + +2021-10-22 Eric Gallager <egallager@gcc.gnu.org> + + PR other/102663 + * Makefile.in: Allow dvi-formatted documentation + to be installed. + +2021-10-17 Lu?s Ferreira <contact@lsferreira.net> + + PR d/102618 + * d-demangle.c (dlang_parse_qualified): Handle anonymous + symbols correctly. + * testsuite/d-demangle-expected: New tests to cover anonymous + symbols. + +2021-10-14 Lu?s Ferreira <contact@lsferreira.net> + + * testsuite/d-demangle-expected: Add test case for function literals. + +2021-10-14 Lu?s Ferreira <contact@lsferreira.net> + + * testsuite/d-demangle-expected: Add test cases for simple special + mangles. + +2021-10-12 Lu?s Ferreira <contact@lsferreira.net> + + * d-demangle.c (dlang_parse_qualified): Remove redudant parenthesis + around lhs and rhs of assignments. + +2021-10-01 Lu?s Ferreira <contact@lsferreira.net> + + * testsuite/d-demangle-expected: Add missing format for new test + +2021-09-23 Lu?s Ferreira <contact@lsferreira.net> + + * d-demangle.c (dlang_Type): Validate MANGLED is nonnull. + * testsuite/d-demangle-expected: New test. + +2021-09-23 Lu?s Ferreira <contact@lsferreira.net> + + * d-demangle.c (dlang_symbol_backref): Ensure strlen of + string is less than length computed by dlang_number. + +2021-09-01 Iain Sandoe <iain@sandoe.co.uk> * configure: Regenerate. + * configure.ac: Do not search for sbrk on Darwin. + * xmalloc.c: Do not declare sbrk unless it has been found + by configure. + +2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org> + + * d-demangle.c (dlang_identifier): Skip over fake parent manglings. + * testsuite/d-demangle-expected: Add tests. + +2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org> + + * d-demangle.c (dlang_parse_arrayliteral): Add 'info' parameter. + (dlang_parse_assocarray): Likewise. + (dlang_parse_structlit): Likewise. + (dlang_value): Likewise. Handle function literal symbols. + (dlang_template_args): Pass 'info' to dlang_value. + * testsuite/d-demangle-expected: Add new test. + +2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org> + + * d-demangle.c (dlang_attributes): Handle typeof(*null). + (dlang_type): Likewise. Demangle 'n' as typeof(null). + * testsuite/d-demangle-expected: Update tests. + +2021-08-23 Iain Sandoe <iain@sandoe.co.uk> + + * simple-object-mach-o.c (simple_object_mach_o_write_segment): + Cast the first argument to set_32 as needed. -2021-07-03 Nick Clifton <nickc@redhat.com> +2021-08-18 Iain Sandoe <iain@sandoe.co.uk> + * simple-object-mach-o.c (simple_object_mach_o_write_segment): + Arrange to swap the LTO index tables where needed. # Please enter the commit message for your changes. Lines starting
2020-09-08sync libiberty from gccAlan Modra1-8/+16
config/ Sync from gcc 2020-07-15 H.J. Lu <hjl.tools@gmail.com> PR bootstrap/96202 * cet.m4 (GCC_CET_HOST_FLAGS): Don't enable CET without CET support in stage1 nor for build support. libiberty/ * configure: Regenerate. Sync from gcc 2020-09-08 Alan Modra <amodra@gmail.com> * d-demangle.c: Include limits.h. (ULONG_MAX, UINT_MAX): Provide fall-back definition. (dlang_number): Simplify and correct overflow test. Only write *ret on returning non-NULL. Make "ret" an unsigned long*. Only succeed for result of [0,UINT_MAX]. (dlang_decode_backref): Simplify and correct overflow test. Only write *ret on returning non-NULL. Only succeed for result [1,MAX_LONG]. (dlang_backref): Remove now unnecessary range check. (dlang_symbol_name_p): Likewise. (string_need): Take a size_t n arg, and use size_t tem. (string_append): Use size_t n. (string_appendn, string_prependn): Take a size_t n arg. (TEMPLATE_LENGTH_UNKNOWN): Define as -1UL. (dlang_lname, dlang_parse_template): Take an unsigned long len arg. (dlang_symbol_backref, dlang_identifier, dlang_parse_integer), (dlang_parse_integer, dlang_parse_string), (dlang_parse_arrayliteral, dlang_parse_assocarray), (dlang_parse_structlit, dlang_parse_tuple), (dlang_template_symbol_param, dlang_template_args): Use unsigned long variables. * testsuite/d-demangle-expected: Add new tests. 2020-08-04 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_function_args): Handle 'in' and 'in ref' parameter storage classes. (dlang_type): Remove identifier type. * testsuite/d-demangle-expected: Update tests. 2020-08-03 Richard Biener <rguenther@suse.de> PR lto/96385 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Localize global UNDEFs and reuse the prevailing name. 2020-07-10 Ian Lance Taylor <iant@golang.org> PR demangler/96143 * cp-demangle.c (d_lambda): Don't add substitution candidate. * testsuite/demangle-expected: Update a few existing test cases accordingly, and add a new test case. 2020-07-04 Jason Merrill <jason@redhat.com> * cp-demangle.c (cplus_demangle_operators): Add di, dx, dX. (d_expression_1): Handle di and dX. (is_designated_init, d_maybe_print_designated_init): New. (d_print_comp_inner): Use d_maybe_print_designated_init. * testsuite/demangle-expected: Add designator tests. 2020-06-25 Nick Clifton <nickc@redhat.com> * bsearch.c (bsearch): Remove use of register keyword. * bsearch_r.c (bsearch_r): Likewise.
2020-06-24Sync config, include and libiberty with GCCH.J. Lu1-0/+80
config/ 2020-06-24 H.J. Lu <hongjiu.lu@intel.com> Sync with GCC 2020-05-29 H.J. Lu <hjl.tools@gmail.com> PR bootstrap/95413 * cet.m4: Replace save_CFLAGS and save_LDFLAGS with cet_save_CFLAGS and cet_save_LDFLAGS. include/ 2020-06-24 H.J. Lu <hongjiu.lu@intel.com> Sync with GCC 2020-06-23 Nick Alcock <nick.alcock@oracle.com> * libiberty.h (bsearch_r): New. 2020-04-17 Martin Liska <mliska@suse.cz> Jonathan Yong <10walls@gmail.com> PR gcov-profile/94570 * filenames.h (defined): Do not define HAVE_DOS_BASED_FILE_SYSTEM for CYGWIN. libiberty/ 2020-06-23 Nick Alcock <nick.alcock@oracle.com> * bsearch_r.c: New file. * Makefile.in (CFILES): Add bsearch_r.c. (REQUIRED_OFILES): Add bsearch_r.o. * functions.texi: Regenerate. 2020-05-29 H.J. Lu <hjl.tools@gmail.com> PR bootstrap/95413 * configure: Regenerated. 2020-05-15 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_attributes): Add @live attribute. * testsuite/d-demangle-expected: Add new tests. 2020-05-14 Rainer Schuetze <r.sagitario@gmx.de> Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (enum dlang_symbol_kinds): Remove enum. (struct dlang_info): New struct (dlang_decode_backref): New function. (dlang_backref): New function. (dlang_symbol_backref): New function. (dlang_type_backref): New function. (dlang_symbol_name_p): New function. (dlang_function_type_noreturn): New function. (dlang_function_type): Add 'info' parameter. Decode function type with dlang_function_type_noreturn. (dlang_function_args): Add 'info' parameter. (dlang_type): Add 'info' parameter. Handle back referenced types. (dlang_identifier): Replace 'kind' parameter with 'info'. Handle back referenced symbols. Split off decoding of plain identifiers to... (dlang_lname): ...here. (dlang_parse_mangle): Replace 'kind' parameter with 'info'. Decode function type and return with dlang_type. (dlang_parse_qualified): Replace 'kind' parameter with 'info', add 'suffix_modifier' parameter. Decode function type with dlang_function_type_noreturn. (dlang_parse_tuple): Add 'info' parameter. (dlang_template_symbol_param): New function. (dlang_template_args): Add 'info' parameter. Decode symbol parameter with dlang_template_symbol_param. Handle back referenced values, and externally mangled parameters. (dlang_parse_template): Add 'info' parameter. (dlang_demangle_init_info): New function. (dlang_demangle): Initialize and pass 'info' parameter. * testsuite/d-demangle-expected: Add new tests.
2019-08-09Synchronize libiberty sources with gcc mainline.Nick Clifton1-0/+20
* libiberty: Sync with gcc. Bring in: 2019-08-08 Martin Liska <mliska@suse.cz> PR bootstrap/91352 * lrealpath.c (is_valid_fd): New function. 2019-07-24 Martin Liska <mliska@suse.cz> PR lto/91228 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Find first '\0' starting from gnu_lto + 1. 2019-07-12 Ren Kimura <rkx1209dev@gmail.com> * simple-object-elf.c (simple_object_elf_match): Check zero value shstrndx. This fixes a Bug 90924. 2019-07-22 Martin Liska <mliska@suse.cz> * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Do not search for gnu_lto_v1, but search for first '\0'. 2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs> * cplus-dem.c: Include rust-demangle.h. * rust-demangle.c: Include rust-demangle.h. * rust-demangle.h: New file. 2019-05-31 Michael Forney <mforney@mforney.org> * cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero. 2019-04-30 Ben L <bobsayshilol@live.co.uk> * d-demangle.c (dlang_parse_assocarray): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_tuple): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_structlit): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_integer): Fix stack underflow. * testsuite/d-demangle-expected: Add testcase. * cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'. * testsuite/demangle-expected: Add testcase. * cp-demangle.c (d_encoding): Guard against NULL return values from d_right (dc). * testsuite/demangle-expected: Add testcase. 2019-04-29 Ben L <bobsayshilol@live.co.uk> * cp-demangle.c (d_expression_1): Don't peek ahead unless the current char is valid. * testsuite/demangle-expected: Add testcase. 2019-04-10 Nick Clifton <nickc@redhat.com> PR 89394 * cp-demangle.c (cplus_demangle_fill_name): Reject negative lengths. (d_count_templates_scopes): Replace num_templates and num_scopes parameters with a struct d_print_info pointer parameter. Adjust body of the function accordingly. Add recursion counter and check that the recursion limit is not reached. (d_print_init): Pass dpi parameter to d_count_templates_scopes. Reset recursion counter afterwards, unless the recursion limit was reached.
2017-06-25Sync libiberty with upstream GCC.Iain Buclaw1-18/+234
libiberty/ChangeLog: * d-demangle.c (dlang_identifier): Prefix mangled init symbols with `initializer for'. * testsuite/demangle-expected: Update tests. * d-demangle.c (dlang_call_convention_p): Move declaration before dlang_type. (dlang_type): Handle function types. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (dlang_parse_real): Remove stack buffer, write the demangled hexadecimal directly to string. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (dlang_hexdigit): New function. (ascii2hex): Remove function. (dlang_parse_string): Update to call dlang_hexdigit. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (strtol): Remove declaration. Updated all callers to use dlang_number. (dlang_number): New function. (dlang_value): Moved check for ISDIGIT into dlang_parse_integer. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (dlang_parse_symbol): Remove function. (dlang_parse_qualified): New function. (dlang_parse_mangle): New function. (dlang_type): Update to call dlang_parse_qualified. (dlang_identifier): Update to call either dlang_parse_qualified or dlang_parse_mangle. (dlang_type_modifier_p): Remove function. (dlang_call_convention_p): Don't allow type modifiers in mangle. (dlang_template_args): Update to call dlang_identifier. (dlang_demangle): Update to call dlang_parse_mangle. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (dlang_value): Add comment explaining why cases for digits are required. * testsuite/d-demangle-expected: Update integer value tests. * d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (dlang_identifier): Handle template constraint symbols. (dlang_parse_template): Only advance if template symbol prefix is followed by a digit. * testsuite/d-demangle-expected: Add tests. * d-demangle.c (dlang_attributes): Handle scope attributes. * testsuite/d-demangle-expected: Add tests.
2016-01-28Sync libiberty with GCC.Iain Buclaw1-20/+32
libiberty/ChangeLog: * d-demangle.c (dlang_call_convention): Handle extern Objective-C function calling convention. (dlang_call_convention_p): Likewise. (dlang_type): Likewise. * testsuite/d-demangle-expected: Add coverage tests. * d-demangle.c (dlang_function_args): Append ',' for variadic functions only if parameters were seen before the elipsis symbol. * testsuite/d-demangle-expected: Add coverage test for parameter-less variadic functions. * d-demangle.c (dlang_type): Handle function types only in the context of seeing a pointer type symbol. * testsuite/d-demangle-expected: Update function pointer tests.
2015-08-11PR gdb/18669 libiberty demangle.test failure: strtod() on sparc-sun-solaris2.9Iain Buclaw1-11/+11
Test symbols did not demangle as per the d-demangle-expected tests because strtod() on Solaris 9 does not accept hexadecimal numbers. This has now been fixed up so that no attempt at formatting/converting the demangled hexadecimal literals are done. libiberty/ChangeLog: 2015-08-11 Iain Buclaw <ibuclaw@gdcproject.org> * d-demangle.c (dlang_parse_real): Remove call to strtod. (strtod): Remove declaration. * testsuite/d-demangle-expected: Update float and complex literal tests to check correct hexadecimal demangling.
2015-06-24Sync libiberty from GCC, replaying updates to configure scriptsIain Buclaw1-12/+156
2014-10-11Sync libiberty with upstream GCC.Iain Buclaw1-0/+936
include/ChangeLog * libiberty.h (PEX_STDOUT_APPEND): New flag. (PEX_STDERR_APPEND): Likewise. * demangle.h (DMGL_DLANG): New macro. (DMGL_STYLE_MASK): Add DMGL_DLANG. (demangling_styles): Add dlang_demangling. (DLANG_DEMANGLING_STYLE_STRING): New macro. (DLANG_DEMANGLING): New macro. (dlang_demangle): New prototype. * longlong.h: Add __udiv_w_sdiv prototype. libiberty/ChangeLog * cp-demangle.c (d_substitution): Handle abi tags on abbreviation. * pex-common.h (struct pex_funcs): Add new parameter for open_write field. * pex-unix.c (pex_unix_open_write): Add support for new parameter. * pex-djgpp.c (pex_djgpp_open_write): Likewise. * pex-win32.c (pex_win32_open_write): Likewise. * pex-common.c (pex_run_in_environment): Likewise. * Makefile.in (CFILES): Add d-demangle.c. (REQUIRED_OFILES): Add d-demangle.o. * cplus-dem.c (libiberty_demanglers): Add dlang_demangling case. (cplus_demangle): Likewise. * d-demangle.c: New file. * testsuite/Makefile.in (really-check): Add check-d-demangle. * testsuite/d-demangle-expected: New file. * simple-object-elf.c (simple_object_elf_write_ehdr): Correctly handle objects with more than SHN_LORESERVE sections. (simple_object_elf_write_shdr): Add sh_link parameter. (simple_object_elf_write_to_file): Correctly handle objects with more than SHN_LORESERVE sections. * cp-demangle.c (d_dump): Only access field from s_fixed part of the union for DEMANGLE_COMPONENT_FIXED_TYPE. (d_count_templates_scopes): Likewise. * testsuite/demangler-fuzzer.c: New file. * testsuite/Makefile.in (fuzz-demangler): New rule. (demangler-fuzzer): Likewise. (mostlyclean): Clean up demangler fuzzer.