compile: Fix detected inferior type
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 16 May 2015 13:36:33 +0000 (15:36 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 16 May 2015 13:38:25 +0000 (15:38 +0200)
gdb/ChangeLog
2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>

* compile/compile-object-load.c (get_out_value_type): Fix returned type.

gdb/ChangeLog
gdb/compile/compile-object-load.c

index 38685997fbc2d91f3e8d0e30756aba5f8c355552..e5de8347852fd2f1a9b23164aed6846fd7bc2b35 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * compile/compile-object-load.c (get_out_value_type): Fix returned type.
+
 2015-05-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
            Phil Muldoon  <pmuldoon@redhat.com>
 
index ed5ef88caa4c8da98cac7bf0d380049a9d9da113..e2d8f2f1c708a15e896d127adc4cf5a0fd63b863 100644 (file)
@@ -372,7 +372,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
                    enum compile_i_scope_types scope)
 {
   struct symbol *gdb_ptr_type_sym, *gdb_val_sym;
-  struct type *gdb_ptr_type, *gdb_type_from_ptr, *gdb_type;
+  struct type *gdb_ptr_type, *gdb_type_from_ptr, *gdb_type, *retval;
   const struct block *block;
   const struct blockvector *bv;
   int nblocks = 0;
@@ -440,6 +440,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
           TYPE_CODE (gdb_type_from_ptr), COMPILE_I_EXPR_VAL,
           objfile_name (objfile));
   
+  retval = gdb_type_from_ptr;
   switch (TYPE_CODE (gdb_type_from_ptr))
     {
     case TYPE_CODE_ARRAY:
@@ -461,7 +462,7 @@ get_out_value_type (struct symbol *func_sym, struct objfile *objfile,
           objfile_name (objfile));
   if (scope == COMPILE_I_PRINT_ADDRESS_SCOPE)
     return NULL;
-  return gdb_type_from_ptr;
+  return retval;
 }
 
 /* Fetch the type of first parameter of FUNC_SYM.
This page took 0.034193 seconds and 4 git commands to generate.