This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: tracepoints: abstract frame base finding in dwarf2loc.c


Jim Blandy wrote:

> Here's a change to dwarf2loc.c that pulls out the guts of the code to
> find a function symbol's frame base expression into its own function.
> We'll also use this function to find frame bases for variables we're
> collecting at a tracepoint, in a later patch.  There should be no
> change in behavior.  Tested on i386 Linux with no regressions.

Nice; I assume you'll be using that to handle DW_OP_fbreg properly and
get rid of the gdbarch_virtual_frame_pointer call in tracepoint_var_ref?

> +/* Find the frame base expression for PC, within FUNCTION.
> +   Set *START to a pointer to it; set *LENGTH to its length.  */
> +static void
> +symbol_frame_base (struct symbol *function, CORE_ADDR pc,
> +                   gdb_byte **start, size_t *length)

I think the FUNCTION is redundant here, it can be recovered
via find_pc_function (pc).  This should in all cases have the
same result as the get_frame_function (frame) call below.

> +  struct symbol *framefunc = get_frame_function (frame);
> +  CORE_ADDR pc = get_frame_address_in_block (frame);

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]