r179879 - Emit the underlying type in the debug info for all kinds of fixed enums
echristo at gmail.com
Fri Apr 19 15:05:42 PDT 2013
On Fri, Apr 19, 2013 at 2:51 PM, Adrian Prantl <aprantl at apple.com> 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.
More information about the cfe-commits