[Bug debug/118837] Interpretation of DW_FORM_data*

2025-06-06 Thread tromey at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837 --- Comment #6 from Tom Tromey --- I also looked through the LLVM DWARF writer. In part it is a bit nicer because it does: void DwarfUnit::addConstantValue(DIE &Die, bool Unsigned, uint64_t Val) { // FIXME: This is a bit conservative/simple

[Bug debug/118837] Interpretation of DW_FORM_data*

2025-06-06 Thread tromey at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837 --- Comment #5 from Tom Tromey --- > If the 64-bit value is > negative, we emit DW_FORM_sdata, otherwise we emit whatever is smallest > representation of the positive value (DW_FORM_data{1,2,4,8}, could perhaps > use DW_FORM_udata). I think I d

[Bug debug/118837] Interpretation of DW_FORM_data*

2025-02-21 Thread tromey at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837 --- Comment #4 from Tom Tromey --- (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 co

[Bug debug/118837] Interpretation of DW_FORM_data*

2025-02-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug debug/118837] Interpretation of DW_FORM_data*

2025-02-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837 --- Comment #2 from Richard Biener --- I don't read any ambiguity. How DW_FORM_data1 255 is interpreted depends on context - but if the context only says 'int', then this is not enough context to decide if char 255 is supposed to be sign or ze

[Bug debug/118837] Interpretation of DW_FORM_data*

2025-02-11 Thread tromey at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837 --- Comment #1 from Tom Tromey --- Also there was an old thread about this: https://lists.dwarfstd.org/pipermail/dwarf-discuss/2010-July/000862.html