From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33770 invoked by alias); 18 Oct 2017 10:14:57 -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 33214 invoked by uid 89); 18 Oct 2017 10:14:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1623 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Oct 2017 10:14:56 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D853020262; Wed, 18 Oct 2017 10:14:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D853020262 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BC1F6D7FB; Wed, 18 Oct 2017 10:14:53 +0000 (UTC) Subject: Re: gcore support for AIX To: Sangamesh Mallayya , Ulrich Weigand References: <20171017101111.9C680D807C2@oc3748833570.ibm.com> Cc: David Edelsohn , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <94423fdc-c014-db28-9b05-712d50e87a40@redhat.com> Date: Wed, 18 Oct 2017 10:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-10/txt/msg00557.txt.bz2 On 10/18/2017 10:41 AM, Sangamesh Mallayya wrote: >> Some comments on the patch itself: >> >>> +#if (GDB_OSABI_DEFAULT == GDB_OSABI_AIX) >> >> We really try to avoid this type of #ifdef conditional code. Platform- >> specific code should be encapsulated into target callback routines. >> There are already some of those related to gcore. If those do not >> suffice to implement this feature on AIX, they should be extended >> or new ones added. The actual implementation can then be provided in >> rs6000-nat.c >> > Thanks for pointing this out. > Best possible solution here to add gcore support for AIX is to implement > it the way it was done for other platforms instead of using gencore > command/API. > And platform changes should go into the rs600-nat.c files. > +1000. > Idea here is just to make gdb continue it's execution after executing > single instruction. > I think waiting on gencore process completion can be also possible and can > be done that way too. Even if you make sure to only run one instruction, that is still undesirable, because by running an instruction you're altering the state of the program that you want to dump core. That instruction may well corrupt the inferior, or kill it... That's extremely surprising for users that are dumping core exactly to save state _because_ they've determined that the program just gotten into a messed up state that they want to be able to analyze again [state which may be hard to reproduce]. I'd really really prefer if AIX implemented core support by making gdb/bfd themselves create the core dump. Thanks, Pedro Alves