https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
--- Comment #4 from Tom Tromey <tromey at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #3) > And perhaps we could also try to optimize the DW_FORM_sdata cases if there > is no ambiguity (e.g. for 8-bit signed contexts with negative value > DW_FORM_data1 could be unambiguous). Ok. I think we're in agreement about the interpretation then? To sum up: * If the context is clearly signed, then DW_FORM_data* should sign-extend. * If the context is clearly unsigned, then DW_FORM_data* should not sign-extend. * If the context is ambiguous, then DW_FORM_[su]data should be used. Perhaps ambiguous contexts should be clarified in the DWARF standard, but that's a separate issue. FWIW I think this is also the LLVM interpretation. There are definitely places in the DWARF emitter that choose DW_FORM_sdata rather than some default. If you both agree with the above I think we can just close this bug and I'll fix gdb.