crash printing non-local variable from nested subprogram
[deliverable/binutils-gdb.git] / gdb / mt-tdep.c
index e3786e815ea8afb8dfd64e0095d52a4510a22055..ddc95229bb094e8ddd5ee1441048cc3ae64fbac9 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Morpho mt processor, for GDB.
 
-   Copyright (C) 2005-2014 Free Software Foundation, Inc.
+   Copyright (C) 2005-2015 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,6 @@
 #include "dis-asm.h"
 #include "arch-utils.h"
 #include "gdbtypes.h"
-#include <string.h>
 #include "regcache.h"
 #include "reggroups.h"
 #include "gdbcore.h"
@@ -35,7 +34,6 @@
 #include "inferior.h"
 #include "dwarf2-frame.h"
 #include "infcall.h"
-#include "gdb_assert.h"
 #include "language.h"
 #include "valprint.h"
 
@@ -417,7 +415,7 @@ mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
       struct symbol *sym;
 
       /* Found a function.  */
-      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL);
+      sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL).symbol;
       if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
        {
          /* Don't use this trick for assembly source files.  */
@@ -683,7 +681,7 @@ mt_registers_info (struct gdbarch *gdbarch,
          regsize = register_size (gdbarch, regnum);
 
          buff = alloca (regsize);
-         bytes = alloca (regsize * sizeof (*bytes));
+         bytes = XALLOCAVEC (unsigned int, regsize);
 
          deprecated_frame_register_read (frame, regnum, buff);
 
This page took 0.023935 seconds and 4 git commands to generate.