This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] Fix DW_OP_GNU_regval_type with FP registers
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>, Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 15 Nov 2013 16:06:35 +0400
- Subject: Re: [RFA] Fix DW_OP_GNU_regval_type with FP registers
- Authentication-results: sourceware.org; auth=none
- References: <1384434175-15561-1-git-send-email-brobecker at adacore dot com> <877gcawvp9 dot fsf at fleche dot redhat dot com>
> >>>>> "Joel" == Joel Brobecker <email@example.com> writes:
> Joel> * dwarf2expr.h (struct dwarf_expr_context_funcs) <read_reg>:
> Joel> Extend the documentation a bit.
> Joel> <get_reg_value>: New field.
> Joel> * dwarf2loc.c (dwarf_expr_get_reg_value)
> Joel> (needs_frame_get_reg_value): New functions.
> Joel> (dwarf_expr_ctx_funcs, needs_frame_ctx_funcs): Add "get_reg_value"
> Joel> callback.
> Joel> * dwarf2-frame.c (get_reg_value): New function.
> Joel> (dwarf2_frame_ctx_funcs): Add "get_reg_value" callback.
> Joel> * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_regval_type>:
> Joel> Use new callback to compute result_val.
> Joel> gdb/testsuite/ChangeLog:
> Joel> * O2_float_param: New testcase.
> Joel> tested on x86_64-linux and ppc-linux.
> Joel> OK to commit?
Thanks both, Pedro and Tom, for reviewing the patch. I immediately
starting thinking about Pedro's suggestion...
> (Eliminating read_reg might be tricky, but I think it'd be nice
> if it were be renamed to something that implies "address", like
> read_addr_reg or some such.)
... and forgot to announce here that I pushed the patch this morning.
Regarding Pedro's suggestion, what do we think of "read_addr_from_reg"?
Still not perfect, as it hides a bit the fact that it only does
a partial register read if the address size is smaller than the
register size. But much better than "read_reg", I agree.