gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / binutils / debug.c
index 0aa1f50755b968a2406a5d952ed57b4c9d263281..5470e155edcfe414196516a719c13e9fe11daa92 100644 (file)
@@ -1,5 +1,5 @@
 /* debug.c -- Handle generic debugging information.
-   Copyright 1995-2013 Free Software Foundation, Inc.
+   Copyright (C) 1995-2020 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>.
 
    This file is part of GNU Binutils.
@@ -2419,6 +2419,9 @@ debug_write_type (struct debug_handle *info,
   int is;
   const char *tag = NULL;
 
+  if (type == DEBUG_TYPE_NULL)
+    return (*fns->empty_type) (fhandle);
+
   /* If we have a name for this type, just output it.  We only output
      typedef names after they have been defined.  We output type tags
      whenever we are not actually defining them.  */
@@ -2481,8 +2484,6 @@ debug_write_type (struct debug_handle *info,
       debug_error (_("debug_write_type: illegal type encountered"));
       return FALSE;
     case DEBUG_KIND_INDIRECT:
-      if (*type->u.kindirect->slot == DEBUG_TYPE_NULL)
-       return (*fns->empty_type) (fhandle);
       return debug_write_type (info, fns, fhandle, *type->u.kindirect->slot,
                               name);
     case DEBUG_KIND_VOID:
@@ -3276,6 +3277,8 @@ debug_class_type_samep (struct debug_handle *info, struct debug_type_s *t1,
              names, since that sometimes fails in the presence of
              typedefs and we really don't care.  */
          if (strcmp (f1->name, f2->name) != 0
+             || f1->type == NULL
+             || f2->type == NULL
              || ! debug_type_samep (info,
                                     debug_get_real_type ((void *) info,
                                                          f1->type, NULL),
This page took 0.023275 seconds and 4 git commands to generate.