On Fri, Apr 19, 2013 at 2:51 PM, Adrian Prantl <[email protected]> wrote:
> 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.
>

And that this ends up bloating the debug info (admittedly by a single
field, but...) when we don't need it to.

> 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.
>

Why not?

-eric

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

Reply via email to