[lldb-dev] SBType/SBValue determine kind

Greg Clayton gclayton at apple.com
Tue Oct 16 09:53:31 PDT 2012


Yes, that was a funny typo bug that I didn't catch where I had:

switch (a)
{
case a1:
    switch b(b)
        case b1:
	base b2:
}

Not the missing {} on the second switch! After switching to a newer clang, we got the warning for unhandled switch statements and I fixed it asap. 

On Oct 16, 2012, at 7:49 AM, Carlo Kok <ck at remobjects.com> wrote:

> Op 16-10-2012 15:33, Carlo Kok schreef:
>> Op 15-10-2012 18:52, Greg Clayton schreef:
>>> You can call:
>>> 
>>> SBType
>>> SBValue::GetType();
>>> 
>>> SBType will describe the type itself. We recently added an enumeration
>>> call:
>>> 
>>> lldb::BasicType
>>> SBType::GetBasicType();
>>> 
>>> This will return an enumeration that describes your type if is is a
>>> basic type (see the lldb::BasicType enumeration definition for details).
>> 
>> 
>> Cool. So I tried that and I get back a eBasicTypeBool for both types in
>> the attached IR file. I emit it with DIBuilder and pass an DW_ATE_signed
>> 32bits:
>> 
>> !9 = metadata !{i32 786468, null, metadata !"Integer", null, i32 0, i64
>> 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [Integer] [line
>> 0, size 32, align 32, offset 0, enc DW_ATE_signed]
>> 
>> 
>> 
>> Is there something special I have to do here? (Integer is the internal
>> name for this type in my language)
> 
> Nevermind. This got fixed 1 lldb revision after I did my last up merge of the Windows branch.
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list