Return unique_xmalloc_ptr for generate_c_for_variable_locations
[deliverable/binutils-gdb.git] / gdb / compile / compile-object-load.c
index f1c8ccd4d09c42e3b89d21f43f1732f53ae8a332..a83f95dda93e82a1090942a09e6af27de5a7841b 100644 (file)
@@ -1,6 +1,6 @@
 /* Load module for 'compile' command.
 
-   Copyright (C) 2014-2017 Free Software Foundation, Inc.
+   Copyright (C) 2014-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,6 +28,7 @@
 #include "gdbcmd.h"
 #include "regcache.h"
 #include "inferior.h"
+#include "gdbthread.h"
 #include "compile.h"
 #include "block.h"
 #include "arch-utils.h"
@@ -439,7 +440,10 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
       block = BLOCKVECTOR_BLOCK (bv, block_loop);
       if (BLOCK_FUNCTION (block) != NULL)
        continue;
-      gdb_val_sym = block_lookup_symbol (block, COMPILE_I_EXPR_VAL, VAR_DOMAIN);
+      gdb_val_sym = block_lookup_symbol (block,
+                                        COMPILE_I_EXPR_VAL,
+                                        symbol_name_match_type::SEARCH_NAME,
+                                        VAR_DOMAIN);
       if (gdb_val_sym == NULL)
        continue;
 
@@ -466,6 +470,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
   gdb_type = check_typedef (gdb_type);
 
   gdb_ptr_type_sym = block_lookup_symbol (block, COMPILE_I_EXPR_PTR_TYPE,
+                                         symbol_name_match_type::SEARCH_NAME,
                                          VAR_DOMAIN);
   if (gdb_ptr_type_sym == NULL)
     error (_("No \"%s\" symbol found"), COMPILE_I_EXPR_PTR_TYPE);
@@ -551,7 +556,6 @@ static void
 store_regs (struct type *regs_type, CORE_ADDR regs_base)
 {
   struct gdbarch *gdbarch = target_gdbarch ();
-  struct regcache *regcache = get_thread_regcache (inferior_ptid);
   int fieldno;
 
   for (fieldno = 0; fieldno < TYPE_NFIELDS (regs_type); fieldno++)
This page took 0.024981 seconds and 4 git commands to generate.