Fix value-dynamic-type

Message ID 87mw490xm8.fsf@igalia.com
State New, archived
Headers

Commit Message

Andy Wingo Feb. 20, 2015, 8:56 a.m. UTC
  Hi,

The attached patch fixes a typo in value-dynamic-type that could cause
it to return #<undefined>.

Andy
  

Comments

Doug Evans Feb. 22, 2015, 5:36 p.m. UTC | #1
Andy Wingo <wingo@igalia.com> writes:
> Hi,
>
> The attached patch fixes a typo in value-dynamic-type that could cause
> it to return #<undefined>.
>
> Andy
>
>
> From c428975bbbf4521766e13d158b12f41392c6bc5e Mon Sep 17 00:00:00 2001
> From: Andy Wingo <wingo@igalia.com>
> Date: Fri, 20 Feb 2015 09:55:25 +0100
> Subject: [PATCH] Fix typo in value-dynamic-type
>
> gdb/ChangeLog:
> 2015-02-20  Andy Wingo  <wingo@igalia.com>
>
> 	* guile/scm-value.c (gdbscm_value_dynamic_type): Fix typo in which
> 	we were checking the cached type, not the cached dynamic type.

LGTM
  

Patch

From c428975bbbf4521766e13d158b12f41392c6bc5e Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@igalia.com>
Date: Fri, 20 Feb 2015 09:55:25 +0100
Subject: [PATCH] Fix typo in value-dynamic-type

gdb/ChangeLog:
2015-02-20  Andy Wingo  <wingo@igalia.com>

	* guile/scm-value.c (gdbscm_value_dynamic_type): Fix typo in which
	we were checking the cached type, not the cached dynamic type.
---
 gdb/ChangeLog         | 5 +++++
 gdb/guile/scm-value.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 34bfba9..575a753 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@ 
 2015-02-20  Andy Wingo  <wingo@igalia.com>
 
+	* guile/scm-value.c (gdbscm_value_dynamic_type): Fix typo in which
+	we were checking the cached type, not the cached dynamic type.
+
+2015-02-20  Andy Wingo  <wingo@igalia.com>
+
 	* guile/scm-frame.c (gdbscm_frame_read_register): New function.
 	(frame_functions): Bind gdbscm_frame_read_register to
 	frame-read-register.
diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c
index cacc55c..f62eb0b 100644
--- a/gdb/guile/scm-value.c
+++ b/gdb/guile/scm-value.c
@@ -552,7 +552,7 @@  gdbscm_value_dynamic_type (SCM self)
   struct type *type = NULL;
   volatile struct gdb_exception except;
 
-  if (! SCM_UNBNDP (v_smob->type))
+  if (! SCM_UNBNDP (v_smob->dynamic_type))
     return v_smob->dynamic_type;
 
   TRY_CATCH (except, RETURN_MASK_ALL)
-- 
2.1.4