aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-07-21 20:03:08 +0000
committerMichael Snyder <msnyder@vmware.com>2000-07-21 20:03:08 +0000
commit3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9 (patch)
tree024c29fb843ad4073cd487f602332d81499c1e0c /gdb
parent7a3120d9a6092b9029231894f8ba1f7620fc6c87 (diff)
downloadgdb-3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9.zip
gdb-3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9.tar.gz
gdb-3dd3139b536d7cbc0ad0cf689c52b4e8c175c2d9.tar.bz2
2000-07-20 Michael Snyder <msnyder@cleaver.cygnus.com>
* valarith.c (value_sub): Call check_typedef.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/valarith.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c2cd85f..1bb70e9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2000-07-20 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * valarith.c (value_sub): Call check_typedef.
+
2000-07-19 Nicholas Duffek <nsd@redhat.com>
* thread.c (free_thread): New function.
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 2db71fd..922bdcc 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -110,8 +110,8 @@ value_sub (arg1, arg2)
- (sz * value_as_long (arg2))));
}
else if (TYPE_CODE (type2) == TYPE_CODE_PTR
- && TYPE_LENGTH (TYPE_TARGET_TYPE (type1))
- == TYPE_LENGTH (TYPE_TARGET_TYPE (type2)))
+ && TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)))
+ == TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type2))))
{
/* pointer to <type x> - pointer to <type x>. */
LONGEST sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));