gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / binutils / prdbg.c
index 5f14d32fb3f179def49ab144243654220524343f..1b376f485fecf04303d39b6240c1475e65e8dfa9 100644 (file)
@@ -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 <ian@cygnus.com>.
    Tags style generation written by Salvador E. Tropea <set@computer.org>.
 
@@ -1624,7 +1624,7 @@ pr_tag_type (void *p, const char *name, unsigned int id,
       t = "union class ";
       break;
     default:
-      abort ();
+      /* PR 25625: Corrupt input can trigger this case.  */
       return FALSE;
     }
 
@@ -1930,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;
 
@@ -2117,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;
 
@@ -2131,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;
     }
This page took 0.024911 seconds and 4 git commands to generate.