Use symbol_set_language to set a symbol's language
[deliverable/binutils-gdb.git] / binutils / debug.c
index ebe63f1f25f2afff8b45e0fb1ecfd41d73e37a94..925d84c07ca2adedf8a70476eccf8ca6fd9d716f 100644 (file)
@@ -1,6 +1,5 @@
 /* debug.c -- Handle generic debugging information.
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007,
-   2009  Free Software Foundation, Inc.
+   Copyright (C) 1995-2019 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>.
 
    This file is part of GNU Binutils.
@@ -31,6 +30,7 @@
 #include <assert.h>
 #include "bfd.h"
 #include "libiberty.h"
+#include "filenames.h"
 #include "debug.h"
 
 /* Global information we keep for debugging.  A pointer to this
@@ -729,9 +729,7 @@ debug_start_source (void *handle, const char *name)
 
   for (f = info->current_unit->files; f != NULL; f = f->next)
     {
-      if (f->filename[0] == name[0]
-         && f->filename[1] == name[1]
-         && strcmp (f->filename, name) == 0)
+      if (filename_cmp (f->filename, name) == 0)
        {
          info->current_file = f;
          return TRUE;
@@ -2421,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.  */
@@ -2483,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:
@@ -3157,6 +3156,7 @@ debug_type_samep (struct debug_handle *info, struct debug_type_s *t1,
             && t1->u.krange->upper == t2->u.krange->upper
             && debug_type_samep (info, t1->u.krange->type,
                                  t2->u.krange->type));
+      break;
 
     case DEBUG_KIND_ARRAY:
       ret = (t1->u.karray->lower == t2->u.karray->lower
This page took 0.039391 seconds and 4 git commands to generate.