Re: Is bitstring support still useful?

Jonas Maebe
2009-07-18T15:17:04Z

On 18 Jul 2009, at 06:09, Daniel Jacobowitz wrote:

> Does this compiler support DWARF,

Yes.

> and if so, how do you represent them
> there?

type
ta = bitpacked array[1..10] of 0..2;

becomes:

0x0000007d: TAG_array_type [5] *
AT_name( "TA" )
AT_byte_size( 0x00000003 )
AT_bit_stride( 0x00000002 )
AT_type( {0x00000094} ( subrange BYTE ) )

0x00000087: TAG_subrange_type [6]
AT_lower_bound( 0x00000001 )
AT_upper_bound( 0x0000000a )
AT_type( {0x000000a0} ( SHORTINT ) )

0x0000008e: NULL

gdb does not handle this yet though (DW_AT_bit_stride is unsupported
in dwarf2read.c). Printing a variable of this type therefore prints it
as if it were an array of 10 bytes. But at least the concept is
representable in DWARF-3, and it just needs fixes in the DWARF reader
(and possibly in the Pascal printer).

Jonas