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: [patch v7 05/24] frame: artificial frame id's


On Fri, 29 Nov 2013 15:38:00 +0100, Markus Metzger wrote:
> --- a/gdb/frame.c
> +++ b/gdb/frame.c
> @@ -504,6 +504,19 @@ frame_id_build_wild (CORE_ADDR stack_addr)
>    return id;
>  }
>  

/* See frame.h.  */

> +struct frame_id
> +frame_id_build_artificial (CORE_ADDR code_addr,
> +			   CORE_ADDR special_addr)
> +{
> +  struct frame_id id = null_frame_id;
> +
> +  id.code_addr = code_addr;
> +  id.code_addr_p = 1;
> +  id.special_addr = special_addr;
> +  id.special_addr_p = 1;
> +  return id;
> +}
> +
>  int
>  frame_id_p (struct frame_id l)
>  {
[...]
> --- a/gdb/frame.h
> +++ b/gdb/frame.h
> @@ -174,6 +174,12 @@ extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr,
>     as the special identifier address are set to indicate wild cards.  */
>  extern struct frame_id frame_id_build_wild (CORE_ADDR stack_addr);
>  
> +/* Construct an artificial frame ID.  The first parameter is the frame's
> +   constant code address (typically the entry point), and the second the

                                  the function entry point

> +   frame's special identifier address.  */
> +extern struct frame_id frame_id_build_artificial (CORE_ADDR code_addr,
> +						  CORE_ADDR special_addr);
> +
>  /* Returns non-zero when L is a valid frame (a valid frame has a
>     non-zero .base).  The outermost frame is valid even without an
>     ID.  */
> -- 
> 1.8.3.1


Thanks,
Jan


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