From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2586 invoked by alias); 23 May 2008 02:54:31 -0000 Received: (qmail 2576 invoked by uid 22791); 23 May 2008 02:54:30 -0000 X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 May 2008 02:54:09 +0000 Received: by ti-out-0910.google.com with SMTP id d10so392305tib.12 for ; Thu, 22 May 2008 19:54:06 -0700 (PDT) Received: by 10.110.84.3 with SMTP id h3mr93316tib.43.1211511246251; Thu, 22 May 2008 19:54:06 -0700 (PDT) Received: by 10.110.109.4 with HTTP; Thu, 22 May 2008 19:54:06 -0700 (PDT) Message-ID: Date: Fri, 23 May 2008 14:31:00 -0000 From: Tea To: "Pedro Alves" Subject: Re: GDB record patch 0.1.3.1 for GDB-6.8 release Cc: gdb-patches@sourceware.org, "Michael Snyder" , "Thiago Jung Bauermann" In-Reply-To: <200805221737.50773.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200805221737.50773.pedro@codesourcery.com> 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-05/txt/msg00673.txt.bz2 Hi Pedro, At first, thanks for your mail. On Fri, May 23, 2008 at 12:37 AM, Pedro Alves wrote: > Hi Teawater, > > I took a really quick glimpse at the patch, and I was wondering if making the > record target a proper target that sits on top of all the other targets > wouldn't make more sense? > > enum strata > { > dummy_stratum, /* The lowest of the low */ > file_stratum, /* Executable files, etc */ > core_stratum, /* Core dump files */ > process_stratum, /* Executing processes */ > thread_stratum, /* Executing threads */ > > record_stratum /* Support reverse debugging */ > }; > > Then, things could be a bit more encapsulated. e.g., this wouldn't be needed, Sorry, I am not very clear this part of code. I tried, but ... > > @@ -1026,10 +1047,18 @@ wait_for_inferior (int treat_exec_as_sig > > while (1) > { > - if (deprecated_target_wait_hook) > - ecs->ptid = deprecated_target_wait_hook (ecs->waiton_ptid, ecs->wp); > + if (record_list && (record_list->next || gdb_is_reverse)) > + { > + ecs->ptid = record_wait (current_gdbarch, ecs->waiton_ptid, > ecs->wp); > + } > else > - ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp); > + { > + if (deprecated_target_wait_hook) > + ecs->ptid = > + deprecated_target_wait_hook (ecs->waiton_ptid, ecs->wp); > + else > + ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp); > + } > > Those new checks could be done inside record_wait, and if eval as false, > defer to the target beneath. I am not very clear your meaning. Could you please write a example for me? Thanks, teawater