Hi Luc,
I have a sial script that uses structures that contain members of type
"bool". When I run the script I get:
File ../devices.sial, line 279, Error: Oops drilldowntype
I looked into the sial code and found that the drilldowntype() functions
fails because no "case TYPE_CODE_BOOL" is defined.
Here the break point at sial.c (323):
default:.
sial_error("Oops drilldowntype");
Breakpoint 1, drilldowntype (type=0x81f088a8, t=0x808023e8) at
sial.c:323
323 sial_error("Oops drilldowntype");
(gdb) print *type
$1 = {pointer_type = 0x0, reference_type = 0x0, chain = 0x81f088a8,
instance_flags = 0, length = 1, main_type = 0x81f088d0}
(gdb) print *type->main_type
$2 = {code = TYPE_CODE_BOOL, flag_unsigned = 1, flag_nosign = 0,
flag_stub = 0, flag_target_stub = 0, flag_static = 0, flag_prototyped
= 0,
flag_incomplete = 0, flag_varargs = 0, flag_vector = 0,
flag_stub_supported = 0, flag_nottext = 0, flag_fixed_instance = 0,
flag_objfile_owned = 1, nfields = 0, vptr_fieldno = -1,
name = 0x200040d8257 "_Bool", tag_name = 0x0, owner = {objfile =
0x80618e10,
gdbarch = 0x80618e10}, target_type = 0x0, fields = 0x0,
vptr_basetype = 0x0, type_specific = {cplus_stuff = 0x0, floatformat =
0x0,
calling_convention = 0}}
When I add "case TYPE_CODE_BOOL" and handle it like "case
TYPE_CODE_INT"
my script works, but I am not sure if that fix is correct.
What do you think?
Michael
---
extensions/sial.c | 1 +
1 file changed, 1 insertion(+)
--- a/extensions/sial.c
+++ b/extensions/sial.c
@@ -286,6 +286,7 @@ int nidx=0;
type=TYPE_TARGET_TYPE(type);
break;
+ case TYPE_CODE_BOOL:
case TYPE_CODE_INT:
sial_parsetype(tstr=TYPE_NAME(type), t, 0);