From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19543 invoked by alias); 13 Jan 2015 17:11:06 -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 19452 invoked by uid 89); 13 Jan 2015 17:11:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 13 Jan 2015 17:11:04 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0DHB3BV031093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 13 Jan 2015 12:11:03 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0DHB1k3001616; Tue, 13 Jan 2015 12:11:02 -0500 Message-ID: <54B551A5.30007@redhat.com> Date: Tue, 13 Jan 2015 17:11:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Sergio Durigan Junior , GDB Patches CC: Gary Benson Subject: Re: [PATCH 2/2] Move code to disable ASR to nat/ References: <1420841943-24290-1-git-send-email-sergiodj@redhat.com> <1420841943-24290-3-git-send-email-sergiodj@redhat.com> In-Reply-To: <1420841943-24290-3-git-send-email-sergiodj@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00351.txt.bz2 Hi Sergio, Thanks. On 01/09/2015 10:19 PM, Sergio Durigan Junior wrote: > This patch moves the shared code present on > gdb/linux-nat.c:linux_nat_create_inferior and > gdb/gdbserver/linux-low.c:linux_create_inferior to > nat/linux-personality.c. This code is responsible for disabling > address space randomization based on user setting, and using > to do that. I decided to put the prototype of the > maybe_disable_address_space_randomization on nat/linux-osdata.h > because it seemed the best place to put it. linux-osdata.h/linux-osdata.c are specifically about TARGET_OBJECT_OSDATA. How about adding a matching nat/linux-personality.h file? > --- a/gdb/nat/linux-osdata.h > +++ b/gdb/nat/linux-osdata.h > @@ -24,4 +24,6 @@ extern int linux_common_core_of_thread (ptid_t ptid); > extern LONGEST linux_common_xfer_osdata (const char *annex, gdb_byte *readbuf, > ULONGEST offset, ULONGEST len); > > +extern struct cleanup *maybe_disable_address_space_randomization (int disable_randomization); Line too long. Write: extern struct cleanup *maybe_disable_address_space_randomization (int disable_randomization); > + warning ("Error disabling address space randomization: %s", > + safe_strerror (errno)); i18n. The GDB version had it. Thanks, Pedro Alves