This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] gdb-gdb.py: Fix TYPE_CODE_RANGE boundary printing
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 15 Jan 2010 20:24:38 +0100
- Subject: [commit] gdb-gdb.py: Fix TYPE_CODE_RANGE boundary printing
Hi,
checked-in as an obvious bugfix.
self.val.type.code was TYPE_CODE_ARRAY as ... the struct describing the range
is really a struct and not a range.
before:
$1 =
{name = 0x0,
tag_name = 0x0,
code = TYPE_CODE_RANGE,
flags = [unsigned|objfile_owned],
owner = 0x1de89b0 (objfile),
target_type = 0x1dfabf0,
vptr_basetype = 0x0,
type_specific_field = TYPE_SPECIFIC_NONE}
after:
$1 =
{name = 0x0,
tag_name = 0x0,
code = TYPE_CODE_RANGE,
flags = [unsigned|objfile_owned],
owner = 0x1de89b0 (objfile),
target_type = 0x1dfabf0,
vptr_basetype = 0x0,
bounds = {0, 8},
type_specific_field = TYPE_SPECIFIC_NONE}
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2010-01/msg00136.html
--- src/gdb/ChangeLog 2010/01/15 12:14:26 1.11258
+++ src/gdb/ChangeLog 2010/01/15 19:22:40 1.11259
@@ -1,3 +1,8 @@
+2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb-gdb.py (StructMainTypePrettyPrinter): Fix TYPE_CODE_RANGE
+ comparison.
+
2010-01-15 Eric Botcazou <botcazou@adacore.com>
"info tasks" broken by typedefs in ATCB type definitions.
--- src/gdb/gdb-gdb.py 2010/01/15 09:15:46 1.2
+++ src/gdb/gdb-gdb.py 2010/01/15 19:22:40 1.3
@@ -225,7 +225,7 @@
if self.val['nfields'] > 0:
for fieldno in range(self.val['nfields']):
fields.append(self.struct_field_img(fieldno))
- if self.val.type.code == gdb.TYPE_CODE_RANGE:
+ if self.val['code'] == gdb.TYPE_CODE_RANGE:
fields.append(self.bounds_img())
fields.append(self.type_specific_img())