[PATCH V4 1/3] gdb: support for eBPF

Simon Marchi simark@simark.ca
Fri Jul 10 14:49:04 GMT 2020


On 2020-07-10 10:29 a.m., Jose E. Marchesi wrote:
> 
> Hi Simon.
>     
>     I have noted a few mostly stylistic comments.  I don't know much
>     about eBPF, so I can't really comment on the behavior.
> 
> Thanks for the review.
>     
>     > +/* Frame unwinder.
>     > +
>     > +   XXX it is not clear how to unwind in eBPF, since the stack is not
>     > +   guaranteed to be contiguous, and therefore no relative stack
>     > +   addressing can be done in the callee in order to access the
>     > +   caller's stack frame.  To explore with xBPF, which will relax this
>     > +   restriction.  */
>     > +
>     > +/* Given THIS_FRAME, return its ID.  */
>     > +
>     > +static void
>     > +bpf_frame_this_id (struct frame_info *this_frame,
>     > +		   void **this_prologue_cache,
>     > +		   struct frame_id *this_id)
>     > +{
>     > +}
>     
>     So if I understand correctly, at the moment there's no unwinding at all,
>     there's always just one frame?  What ID does that frame have?  Would it
>     still be good to assign something (constant) to *THIS_ID to make sure it's
>     not random junk?
> 
> Would setting null_frame_id make sense there?
> 

I don't know enough off-hand to tell.

Simon


More information about the Gdb-patches mailing list