To briefly summarize a discussion in #llvm: 
The problem the patch addresses is that lldb displays negative enumerator 
values for fixed enums as unsigned values. 

This patch solves this by attaching the (optional) underlying type of the enum 
if there is one specified (for example NSInteger in the test case that comes 
with the patch). This is something we used to do for all scoped enums, and the 
patch extends this to all fixed enums.

Eric points out that it should be sufficient to emit a negative 
DW_AT_const_value for the enumerator
to let the debugger deduce that this is a signed data type. However, he also 
points out that darwin-gdb will probably not be able understand that. 

Update: We actually do emit the enumerators as signed values (DW_FORM_sdata). 
But it’s not enough for lldb to deduce the signedness in all cases.

I did clean up the tests as suggested.

-- adrian
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to