From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5558 invoked by alias); 19 Oct 2009 04:34:25 -0000 Received: (qmail 5549 invoked by uid 22791); 19 Oct 2009 04:34:24 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f175.google.com (HELO mail-px0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Oct 2009 04:34:19 +0000 Received: by pxi5 with SMTP id 5so1810194pxi.12 for ; Sun, 18 Oct 2009 21:34:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.26.39 with SMTP id d39mr272492wfj.223.1255926858130; Sun, 18 Oct 2009 21:34:18 -0700 (PDT) In-Reply-To: <4ADA93C9.5040601@vmware.com> References: <4AD91D72.1030802@vmware.com> <831vl2ifui.fsf@gnu.org> <4ADA0EB3.60104@vmware.com> <83my3phjew.fsf@gnu.org> <4ADA4191.4060404@vmware.com> <83k4ytgxh5.fsf@gnu.org> <4ADA93C9.5040601@vmware.com> From: Hui Zhu Date: Mon, 19 Oct 2009 04:34:00 -0000 Message-ID: Subject: Re: [RFA, 3 of 3] save/restore process record, part 3 (save/restore) To: Michael Snyder Cc: Eli Zaretskii , "gdb-patches@sourceware.org" 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-10/txt/msg00422.txt.bz2 Hi Michael, + do_cleanups (old_cleanups); This line will remove the record file that we just save. I change some code: static void record_save_cleanups (void *data) { bfd *obfd =3D data; //char *pathname =3D xstrdup (bfd_get_filename (obfd)); bfd_close (obfd); //unlink (pathname); //xfree (pathname); } I think you want unlink the gdb_record when save get some error. It maybe need "discard_cleanups" the old_cleanups and bfd_close (obfd); After change the code, everything is OK. I try it in i386 ubuntu. Testsuite is OK too. Thanks for you are working on it. :) Thanks, Hui On Sun, Oct 18, 2009 at 12:04, Michael Snyder wrote: > Eli Zaretskii wrote: >>> >>> Date: Sat, 17 Oct 2009 15:13:37 -0700 >>> From: Michael Snyder >>> CC: "gdb-patches@sourceware.org" , >>> =A0"teawater@gmail.com" >>> >>>>> This is the same approach that is used by the "gcore" command. >>>>> How does "gcore" work with go32, if at all? >>>> >>>> It doesn't. =A0DJGPP cannot generate core files. >>> >>> Well, save/restore depends on core files, so I guess >>> it won't work in go32. >> >> DJGPP does not support core files created from a memory image of a >> running process, but I don't see any reason why bfdcore_write won't >> work for it. > > We don't just do bfdcore_write -- we actually create a core file > from the memory image, and then add an extra segment to it for > bfdcore_write to write into. =A0The core file is an integral part > of the execution log file. > > I forgot to post the accompanying changes to gcore.c with this > patch. =A0I'm just about to put them up now that Hui reminded me. > >