X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=binutils%2Fprdbg.c;h=ef6fe61a0ff9562e0603194c11b346088e211bcc;hb=acdf84a65400f416c60a0c9c14953ba5a73fb0cd;hp=4b9fa06c266658d601f869fa0927f254638d6b34;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/prdbg.c b/binutils/prdbg.c index 4b9fa06c26..ef6fe61a0f 100644 --- a/binutils/prdbg.c +++ b/binutils/prdbg.c @@ -1,5 +1,5 @@ /* prdbg.c -- Print out generic debugging information. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. Written by Ian Lance Taylor . Tags style generation written by Salvador E. Tropea . @@ -286,6 +286,8 @@ static const struct debug_write_fns tg_fns = pr_end_function, /* Same, does nothing. */ tg_lineno }; + +static int demangle_flags = DMGL_ANSI | DMGL_PARAMS; /* Print out the generic debugging information recorded in dhandle. */ @@ -1928,14 +1930,14 @@ find_address_in_section (bfd *abfd, asection *section, void *data) if (found) return; - if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0) + if ((bfd_section_flags (section) & SEC_ALLOC) == 0) return; - vma = bfd_get_section_vma (abfd, section); + vma = bfd_section_vma (section); if (pc < vma) return; - size = bfd_get_section_size (section); + size = bfd_section_size (section); if (pc >= vma + size) return; @@ -2115,6 +2117,7 @@ tg_start_class_type (void *p, const char *tag, unsigned int id, struct pr_handle *info = (struct pr_handle *) p; char *tv = NULL; const char *name; + char idbuf[20]; info->indent += 2; @@ -2129,8 +2132,6 @@ tg_start_class_type (void *p, const char *tag, unsigned int id, name = tag; else { - char idbuf[20]; - sprintf (idbuf, "%%anon%u", id); name = idbuf; } @@ -2600,7 +2601,7 @@ tg_variable (void *p, const char *name, enum debug_var_kind kind, dname = NULL; if (info->demangler) - dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS); + dname = info->demangler (info->abfd, name, demangle_flags); from_class = NULL; if (dname != NULL) @@ -2661,7 +2662,7 @@ tg_start_function (void *p, const char *name, bfd_boolean global) dname = NULL; if (info->demangler) - dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS); + dname = info->demangler (info->abfd, name, demangle_flags); if (! substitute_type (info, dname ? dname : name)) return FALSE;