summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2015-05-16 15:36:33 +0200
committerJan Kratochvil <jan.kratochvil@redhat.com>2015-05-16 15:38:25 +0200
commit4d18dfad9edf822df205edc2c1fe3fe9f1e467b8 (patch)
treea28ea0c7a9a9c6b628efe3c9eb1d7521d75f73d0
parentbbec1a5db7d3de1322cdc5a859d0c2a44ae1231f (diff)
downloadbinutils-gdb-4d18dfad9edf822df205edc2c1fe3fe9f1e467b8.tar.gz
compile: Fix detected inferior type
gdb/ChangeLog 2015-05-16 Jan Kratochvil <jan.kratochvil@redhat.com> * compile/compile-object-load.c (get_out_value_type): Fix returned type.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/compile/compile-object-load.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 38685997fbc..e5de8347852 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,8 @@
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>
* NEWS (Changes since GDB 7.9): Add compile print.
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index ed5ef88caa4..e2d8f2f1c70 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -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.