+2016-09-02 Tom Tromey <tom@tromey.com>
+
+ PR gdb/11616:
+ * dwarf2read.c (decode_locdesc): Handle DW_OP_form_tls_address.
+ * dwarf2loc.c (dwarf2_compile_expr_to_ax): Handle
+ DW_OP_form_tls_address.
+ (locexpr_describe_location_piece): Likewise.
+ * dwarf2expr.h (struct dwarf_expr_context_funcs): Update comment.
+ * dwarf2expr.c (execute_stack_op): Handle DW_OP_form_tls_address.
+ (ctx_no_get_tls_address): Mention DW_OP_form_tls_address.
+ * compile/compile-loc2c.c (struct insn_info): Update comment.
+ (compute_stack_depth_worker): Handle DW_OP_form_tls_address.
+
2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
* target.c (target_wait): Mention that the function's prototype
unsigned int label : 1;
- /* Whether this instruction is DW_OP_GNU_push_tls_address. This is
- a hack until we can add a feature to glibc to let us properly
- generate code for TLS. */
+ /* Whether this instruction is DW_OP_GNU_push_tls_address or
+ DW_OP_form_tls_address. This is a hack until we can add a
+ feature to glibc to let us properly generate code for TLS. */
unsigned int is_tls : 1;
};
break;
case DW_OP_GNU_push_tls_address:
+ case DW_OP_form_tls_address:
info[ndx].is_tls = 1;
break;
break;
case DW_OP_GNU_push_tls_address:
+ case DW_OP_form_tls_address:
/* Variable is at a constant offset in the thread-local
storage block into the objfile for the current thread and
the dynamic linker module containing this expression. Here
CORE_ADDR
ctx_no_get_tls_address (void *baton, CORE_ADDR offset)
{
- error (_("%s is invalid in this context"), "DW_OP_GNU_push_tls_address");
+ error (_("%s is invalid in this context"), "DW_OP_form_tls_address");
}
/* Stub dwarf_expr_context_funcs.dwarf_call implementation. */
CORE_ADDR (*get_frame_pc) (void *baton);
/* Return the thread-local storage address for
- DW_OP_GNU_push_tls_address. */
+ DW_OP_GNU_push_tls_address or DW_OP_form_tls_address. */
CORE_ADDR (*get_tls_address) (void *baton, CORE_ADDR offset);
/* Execute DW_AT_location expression for the DWARF expression subroutine in
break;
case DW_OP_GNU_push_tls_address:
+ case DW_OP_form_tls_address:
unimplemented (op);
break;
&& (data[0] == DW_OP_addr
|| (addr_size == 4 && data[0] == DW_OP_const4u)
|| (addr_size == 8 && data[0] == DW_OP_const8u))
- && data[1 + addr_size] == DW_OP_GNU_push_tls_address
+ && (data[1 + addr_size] == DW_OP_GNU_push_tls_address
+ || data[1 + addr_size] == DW_OP_form_tls_address)
&& piece_end_p (data + 2 + addr_size, end))
{
ULONGEST offset;
&& data + 1 + (leb128_size = skip_leb128 (data + 1, end)) < end
&& data[0] == DW_OP_GNU_const_index
&& leb128_size > 0
- && data[1 + leb128_size] == DW_OP_GNU_push_tls_address
+ && (data[1 + leb128_size] == DW_OP_GNU_push_tls_address
+ || data[1 + leb128_size] == DW_OP_form_tls_address)
&& piece_end_p (data + 2 + leb128_size, end))
{
uint64_t offset;
break;
case DW_OP_GNU_push_tls_address:
+ case DW_OP_form_tls_address:
/* The top of the stack has the offset from the beginning
of the thread control block at which the variable is located. */
/* Nothing should follow this operator, so the top of stack would