Avoid code duplication in loc list handling in dwarf2out

David Edelsohn dje.gcc@gmail.com
Mon Sep 21 13:10:00 GMT 2009


Hi, Honza,

Thanks.  Yes, that allows dwarf2out.c to be compiled on AIX.

FYI, I think your patch makes the #endif/#ifdef at the end of
address_of_int_loc_descriptor() redundant.

Thanks, David

On Mon, Sep 21, 2009 at 9:01 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> Honza,
>>
>> This patch has broken bootstrap on AIX:
>>
>> ld: 0711-317 ERROR: Undefined symbol: .add_loc_descr_op_piece
>
> It looks like one use of add_loc_descr_op_piece got misplaced in the
> maze of ifdefs in dwarf2out and is enabled for !DWARD_DEBUG_INFO &&
> DWARF_UNWIND_INFO too.
>
> Does this help?
>
> Honza
>
> Index: dwarf2out.c
> ===================================================================
> --- dwarf2out.c (revision 151917)
> +++ dwarf2out.c (working copy)
> @@ -10884,6 +10884,9 @@ int_loc_descriptor (HOST_WIDE_INT i)
>
>   return new_loc_descr (op, i, 0);
>  }
> +#endif
> +
> +#ifdef DWARF2_DEBUGGING_INFO
>
>  /* Return loc description representing "address" of integer value.
>    This can appear only as toplevel expression.  */
> @@ -10942,9 +10945,6 @@ address_of_int_loc_descriptor (int size,
>   loc_result->dw_loc_oprnd2.v.val_int = i;
>   return loc_result;
>  }
> -#endif
> -
> -#ifdef DWARF2_DEBUGGING_INFO
>
>  /* Return a location descriptor that designates a base+offset location.  */
>



More information about the Gcc-patches mailing list