[RFA] Fix typo in replace type
Joel Brobecker
brobecker@adacore.com
Wed Feb 28 19:24:00 GMT 2007
This is a followup on something that was discovered while reviewing
a stabs patch:
http://www.sourceware.org/ml/gdb-patches/2007-02/msg00139.html
In particular, this is where we discovered this little typo:
http://www.sourceware.org/ml/gdb-patches/2007-02/msg00368.html
I confirm that I misanalyzed the second problem I mentioned in my
original message, and that this is the source of the issue I was seeing:
Breakpoint 1, pck.lock.set (x=Unrecognized 0-bit floating-point type.
) at pck.adb:11
Basically, the effect of the typo is that we forgot to update the
type length of the other types in the same CV ring. Fixed thusly.
2007-02-28 Joel Brobecker <brobecker@adacore.com>
* gdbtypes.c (replace_type): Fix typo that caused us to not update
length of the types referenced by the new type CV ring.
Tested on x86-linux, no regression. OK to apply?
Thanks,
--
Joel
-------------- next part --------------
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.113
diff -u -p -r1.113 gdbtypes.c
--- gdbtypes.c 28 Feb 2007 16:35:48 -0000 1.113
+++ gdbtypes.c 28 Feb 2007 19:09:56 -0000
@@ -636,7 +636,7 @@ replace_type (struct type *ntype, struct
call replace_type(). */
gdb_assert (TYPE_ADDRESS_CLASS_ALL (chain) == 0);
- TYPE_LENGTH (ntype) = TYPE_LENGTH (type);
+ TYPE_LENGTH (chain) = TYPE_LENGTH (type);
chain = TYPE_CHAIN (chain);
} while (ntype != chain);
More information about the Gdb-patches
mailing list