From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13298 invoked by alias); 11 Nov 2008 05:34:50 -0000 Received: (qmail 13173 invoked by uid 22791); 11 Nov 2008 05:34:50 -0000 X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.191) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Nov 2008 05:34:13 +0000 Received: by ti-out-0910.google.com with SMTP id d10so1810188tib.12 for ; Mon, 10 Nov 2008 21:34:10 -0800 (PST) Received: by 10.110.103.5 with SMTP id a5mr5672110tic.26.1226381650462; Mon, 10 Nov 2008 21:34:10 -0800 (PST) Received: by 10.110.103.3 with HTTP; Mon, 10 Nov 2008 21:34:10 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 05:50:00 -0000 From: teawater To: "Eli Zaretskii" Subject: Re: [RFA] Process record and replay, 4/10 Cc: gdb-patches@sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-IsSubscribed: yes 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 X-SW-Source: 2008-11/txt/msg00208.txt.bz2 Thanks Eli. On Sat, Nov 8, 2008 at 17:27, Eli Zaretskii wrote: >> Date: Sat, 8 Nov 2008 14:28:56 +0800 >> From: teawater >> Cc: gdb-patches@sourceware.org >> >> On Fri, Nov 7, 2008 at 23:10, Eli Zaretskii wrote: >> >> Date: Thu, 6 Nov 2008 15:47:45 +0800 >> >> From: teawater >> >> >> >> + /* Set the real beneath function pointers. */ >> > >> > Could you please rephrase this comment? I don't understand what it >> > tries to say. >> > >> > Thanks. >> > >> >> What about change it to "Update the function pointers that process record use." > > Maybe, but you use the word "beneath" in many more places, and also in > symbol names, so that word should probably not be removed from the > comment. I use "beneath" because: struct target_ops { struct target_ops *beneath; /* To the target under this one. */ > > Could you explain what is meant by "beneath function pointers" in this > case? I could then suggest a better wording for this particular > comment. > Great! It will help me a lot. :) When GDB in record mode, we need to call the really debug function in low strata target because process record and replay target need call this function to control the inferior. Struct target_ops already has a pointer "beneath" point to low strata target, but process record and replay target doesn't use it. Because if low strata target doesn't set some function pointers, process record and replay target will need to call the function pointers of the target that is low strata target of this target. If this target doesn't set them too, it will need to call anothers. So use "beneath" is not a good choice and "multi-thread" target that need function pointers of low strata target doesn't use "beneath" too. The process record and replay target has 6 function pointers record_beneath_to_resume, record_beneath_to_wait, record_beneath_to_prepare_to_store, record_beneath_to_xfer_partial, record_beneath_to_insert_breakpoint and record_beneath_to_remove_breakpoint. They are set in function "update_current_target". They are always point to the function of low strata target.