DJ Delorie <[EMAIL PROTECTED]> writes:
> The m32c port has this:
>
> #define DWARF2_ADDR_SIZE 4
>
> However, dwarf2asm.c has this:
>
> int
> size_of_encoded_value (int encoding)
> {
> . . .
> case DW_EH_PE_absptr:
> return POINTER_SIZE / BITS_PER_UNIT;
>
> The net result is that the EH sections have 2 byte pointers for the
> m16c variant (HImode pointers), which screws up binutils, which is
> expecting 4. The m32c variant (PSImode pointers) is OK.
>
> Before I go hard-coding a "2" into binutils, I ask... is gcc supposed
> to honor DWARF2_ADDR_SIZE for absptr? What's the reasoning behind the
> way it is?
The EH code does seem to use POINTER_SIZE pretty consistently.
DWARF2_ADDR_SIZE is for the debug info, not the exception frame info.
I haven't looked into the history of why this is so.
Note that you can control this to use your preferred size by defining
ASM_PREFERRED_EH_DATA_FORMAT. Have it return, e.g., DW_EH_PE_sdata4
and all should be well.
Ian