This is the mail archive of the dwarf2@corp.sgi.com mailing list for the dwarf2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PROPOSAL: Add DW_ATE_wchar_t base type for C++



>Whether on not C or C++ considers it fundamental or a keyword, in Dwarf 2 it is 
>not.  It is a distinct integer type, just as "long int" is a distinct type from 
>"short int" or "int".  All are represented in Dwarf 2 as a base type which has a
>DW_ATE_signed_integer attribute.

I see your point. Even so, I would quibble with you about whether wchar_t is
properly considered just a "distinct integer type" in C++. There are a variety
of operations, like printing and locale dependent interpretation, that apply
either differently or not at all to wchar_t compared to integer types.

>Note that Dwarf 2 does not define the encoding used by DW_ATE_(un)signed_char.
>I think that a good case can be made for describing "wchar_t" in Dwarf 2 as
>a DW_ATE_(un)signed_char with a size of 2 or 4.  In this case, like the 
>definition of "signed char", the exact encoding used is not defined, but the
>debugger is expected to be able to interpret it correctly.

But I'll accept that an encoding of DW_ATE_unsigned_char with a size of
2 or 4 gets close enough for DWARF2 purposes.

I withdraw the proposal as not needed.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]