This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: valarith fixup
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH]: valarith fixup
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Thu, 20 Jul 2000 18:52:03 -0700 (PDT)
2000-07-20 Michael Snyder <msnyder@cleaver.cygnus.com>
* valarith.c (value_sub): Call check_typedef.
Index: valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.3
diff -p -r1.3 valarith.c
*** valarith.c 2000/05/28 01:12:33 1.3
--- valarith.c 2000/07/21 01:51:37
*************** value_sub (arg1, arg2)
*** 110,117 ****
- (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)))
{
/* pointer to <type x> - pointer to <type x>. */
LONGEST sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));
--- 110,117 ----
- (sz * value_as_long (arg2))));
}
else if (TYPE_CODE (type2) == TYPE_CODE_PTR
! && 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)));