Add "volatile" keyword to "struct gdb_exception" declaration
[deliverable/binutils-gdb.git] / gdb / linux-tdep.c
index 5bca07666b7cf35b0e4b2c4624f496ed4e6f9f91..bd1e5a2f36cd111c052fcf414f5aab0c60625bde 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux, architecture independent.
 
-   Copyright (C) 2009-2013 Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,7 +32,6 @@
 #include "cli/cli-utils.h"
 #include "arch-utils.h"
 #include "gdb_obstack.h"
-#include "cli/cli-utils.h"
 
 #include <ctype.h>
 
@@ -1193,7 +1192,7 @@ linux_corefile_thread_callback (struct thread_info *info, void *data)
       struct cleanup *old_chain;
       struct regcache *regcache;
       gdb_byte *siginfo_data;
-      LONGEST siginfo_size;
+      LONGEST siginfo_size = 0;
 
       regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
 
@@ -1209,14 +1208,15 @@ linux_corefile_thread_callback (struct thread_info *info, void *data)
                                       args->note_data, args->note_size,
                                       args->stop_signal);
 
-      if (siginfo_data != NULL)
-       {
+      /* Don't return anything if we got no register information above,
+         such a core file is useless.  */
+      if (args->note_data != NULL)
+       if (siginfo_data != NULL)
          args->note_data = elfcore_write_note (args->obfd,
                                                args->note_data,
                                                args->note_size,
                                                "CORE", NT_SIGINFO,
                                                siginfo_data, siginfo_size);
-       }
 
       do_cleanups (old_chain);
     }
This page took 0.024739 seconds and 4 git commands to generate.