> OK with a couple of nits I found on the second read.
>
>> +  if (!(pp->flags&  pp_c_flag_gnu_v3)&&  TREE_CODE (t) != POINTER_TYPE)
>> +    pp_c_type_qualifier_list (pp, t);
>
> You can use 'code' here instead of TREE_CODE(t).  Either that, or remove the
> declaration of 'code' above.
>
>> -  if (TREE_CODE (t) != POINTER_TYPE)
>> +  if ((pp->flags&  pp_c_flag_gnu_v3)&&  TREE_CODE (t) != POINTER_TYPE)
>
> Likewise here.

Fixed. Note that the original code was guilty as well. :-)

>> +/* DW_OP_addr is relocated by the debug info consumer, while
>> +   tls relative operands should not be.  */
>> +
>> +static inline enum dwarf_location_atom dw_addr_op (bool dtprel)
>
> Can you describe what DTPREL is used for here?

I've rewritten the comment as follows:

/* Return the operator to use for an address of a variable.
   DTPREL is true for thread-local variables whose address
   is really an offset relative to the TLS pointer, which
   will need link-time relocation, but will not need relocation
   by the DWARF consumer.  For those, we use DW_OP_const*.
   For regular variables, which need both link-time relocation
   and consumer-level relocation (e.g., to account for
   shared objects loaded at a random address), we use
   DW_OP_addr*.  */

Thanks!

-cary

Reply via email to