Index: gcc/include/dwarf2.h =================================================================== --- gcc.orig/include/dwarf2.h 2011-01-13 11:59:21.000000000 +0100 +++ gcc/include/dwarf2.h 2011-02-17 14:00:16.175818900 +0100 @@ -47,6 +47,35 @@ #ifndef _ELF_DWARF2_H #define _ELF_DWARF2_H +#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +/* We need here widest integer type so that even for cross scenarios + a wide enough integer scalar value is used to hold address vma. + Additionally it is necessary here to use for non-LP64 targets the + proper integer scalar value to hold an address. */ +#ifdef __GNUC__ +__extension__ +#endif +typedef unsigned long long dw2_vma_t; +#ifdef __GNUC__ +__extension__ +#endif +typedef signed long long dw2_svma_t; + +#ifndef __MINGW32__ +#define DW2_VMA_FMT "ll" +#else +#define DW2_VMA_FMT "I64" +#endif + +#else + +typedef unsigned long dw2_vma_t; +typedef signed long dw2_svma_t; + +#define DW2_VMA_FMT "l" + +#endif + /* Structure found in the .debug_line section. */ typedef struct { @@ -63,7 +92,7 @@ DWARF2_External_LineInfo; typedef struct { - unsigned long li_length; + dw2_vma_t li_length; unsigned short li_version; unsigned int li_prologue_length; unsigned char li_min_insn_length; @@ -87,10 +116,10 @@ DWARF2_External_PubNames; typedef struct { - unsigned long pn_length; + dw2_vma_t pn_length; unsigned short pn_version; - unsigned long pn_offset; - unsigned long pn_size; + dw2_vma_t pn_offset; + dw2_vma_t pn_size; } DWARF2_Internal_PubNames; @@ -106,9 +135,9 @@ DWARF2_External_CompUnit; typedef struct { - unsigned long cu_length; + dw2_vma_t cu_length; unsigned short cu_version; - unsigned long cu_abbrev_offset; + dw2_vma_t cu_abbrev_offset; unsigned char cu_pointer_size; } DWARF2_Internal_CompUnit; @@ -125,9 +154,9 @@ DWARF2_External_ARange; typedef struct { - unsigned long ar_length; + dw2_vma_t ar_length; unsigned short ar_version; - unsigned long ar_info_offset; + dw2_vma_t ar_info_offset; unsigned char ar_pointer_size; unsigned char ar_segment_size; } @@ -754,7 +783,15 @@ enum dwarf_calling_convention DW_CC_hi_user = 0xff, DW_CC_GNU_renesas_sh = 0x40, - DW_CC_GNU_borland_fastcall_i386 = 0x41 + DW_CC_GNU_borland_fastcall_i386 = 0x41, + + /* This DW_CC_ value is not currently generated by any toolchain. It is + used internally to GDB to indicate OpenCL C functions that have been + compiled with the IBM XL C for OpenCL compiler and use a non-platform + calling convention for passing OpenCL C vector types. This value may + be changed freely as long as it does not conflict with any other DW_CC_ + value defined here. */ + DW_CC_GDB_IBM_OpenCL = 0xff }; /* Inline attribute. */