From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 976B63842400 for ; Fri, 10 Jul 2020 14:49:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 976B63842400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id DBBF81E792; Fri, 10 Jul 2020 10:49:04 -0400 (EDT) Subject: Re: [PATCH V4 1/3] gdb: support for eBPF To: "Jose E. Marchesi" Cc: gdb-patches@sourceware.org References: <20200710122530.32541-1-jose.marchesi@oracle.com> <20200710122530.32541-2-jose.marchesi@oracle.com> <199653b9-ee2a-b3cc-acbf-6a8293363407@simark.ca> <87blknqw91.fsf@oracle.com> From: Simon Marchi Message-ID: <7eb355b4-9674-c838-e205-1dbc67ebc50e@simark.ca> Date: Fri, 10 Jul 2020 10:49:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87blknqw91.fsf@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 14:49:06 -0000 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