From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14769 invoked by alias); 30 Jul 2013 14:07:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14726 invoked by uid 89); 30 Jul 2013 14:07:25 -0000 X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 14:07:25 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 30 Jul 2013 07:07:16 -0700 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga002.fm.intel.com with ESMTP; 30 Jul 2013 07:07:16 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.157]) by IRSMSX102.ger.corp.intel.com ([169.254.2.58]) with mapi id 14.03.0123.003; Tue, 30 Jul 2013 15:06:31 +0100 From: "Metzger, Markus T" To: Tom Tromey , "gdb-patches@sourceware.org" Subject: RE: [PATCH 2/8] add target method delegation Date: Tue, 30 Jul 2013 14:07:00 -0000 Message-ID: References: <1375116324-32092-1-git-send-email-tromey@redhat.com> <1375116324-32092-3-git-send-email-tromey@redhat.com> In-Reply-To: <1375116324-32092-3-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-07/txt/msg00765.txt.bz2 > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourcewa= re.org] On Behalf Of Tom Tromey > Sent: Monday, July 29, 2013 6:45 PM > To fix the first problem, this patch introduces a handful of > target_delegate_* functions, which forward calls further down the > target stack. I'm doing this explicitly in record-btrace.c. Seems I should have added the delegate functions, instead. I'll change it to use your delegates. Once we have all the delegates in place, shouldn't we rewrite the original target_~ functions to call the respective target_delegate_~ with ¤t_target as first argument? > To fix the second problem, this patch adds find_target_at to determine > whether a target appears at a given stratum. This may seem like > overkill somehow, but I have a subsequent patch series (see archer.git > tromey/multi-target) that uses it more heavily. I'd rather consistently add struct target_opc *self as first parameter to a= ll target functions. I did this for target_prepare_to_store for exactly the reason of delegating a request I don't handle in record-btrace.c (patch is currently under review). Otherwise, we rely on the fact that the target doing the delegation is at the top of its stratum. This holds for record targets and I may be ignorant enough to not realize that this holds in general. If we could have another target on top of us in the same stratum, though, we would delegate to ourselves. Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052