From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28792 invoked by alias); 18 Mar 2009 13:05:02 -0000 Received: (qmail 28747 invoked by uid 22791); 18 Mar 2009 13:05:01 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.190) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Mar 2009 13:04:56 +0000 Received: by ti-out-0910.google.com with SMTP id a1so27078tib.12 for ; Wed, 18 Mar 2009 06:04:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.3.15 with SMTP id 15mr1923913tic.43.1237381493708; Wed, 18 Mar 2009 06:04:53 -0700 (PDT) In-Reply-To: <200903092034.57367.pedro@codesourcery.com> References: <200903092034.57367.pedro@codesourcery.com> Date: Wed, 18 Mar 2009 13:05:00 -0000 Message-ID: Subject: Re: [RFA] Submit process record and replay third time, 3/9 From: teawater To: Pedro Alves Cc: gdb-patches@sourceware.org, Marc Khouzam Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2009-03/txt/msg00373.txt.bz2 > > >> + >> +static void >> +record_disconnect (struct target_ops *target, char *args, int from_tty) >> +{ >> + =A0if (record_debug) >> + =A0 =A0fprintf_unfiltered (gdb_stdlog, "Process record: record_disconn= ect\n"); >> + >> + =A0unpush_target (&record_ops); >> + =A0target_disconnect (args, from_tty); >> +} >> + >> +static void >> +record_detach (struct target_ops *ops, char *args, int from_tty) >> +{ >> + =A0if (record_debug) >> + =A0 =A0fprintf_unfiltered (gdb_stdlog, "Process record: record_detach\= n"); >> + >> + =A0unpush_target (&record_ops); >> + =A0target_detach (args, from_tty); >> +} > > This trick you're using happens to work, but, could you try > this instead? =A0Here and elsewhere similarly. > > =A0struct target_ops *beneath =3D find_target_beaneath (ops); > =A0unpush_target (ops); > =A0beneath->to_detach (args, from_tty); > If beneath->to_detach is NULL, it will make gdb crash. Thanks, Hui