From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12644 invoked by alias); 18 Jun 2014 11:50:49 -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 12634 invoked by uid 89); 18 Jun 2014 11:50:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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; Wed, 18 Jun 2014 11:50:48 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5IBokji004815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 18 Jun 2014 07:50:46 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5IBoj0C010362; Wed, 18 Jun 2014 07:50:45 -0400 Message-ID: <53A17D14.30105@redhat.com> Date: Wed, 18 Jun 2014 11:50:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Gary Benson CC: gdb-patches@sourceware.org Subject: Re: [PATCH 13/15] Move macros from i386-{nat,low}.c to i386-{nat,low}.h References: <1403014378-4349-1-git-send-email-gbenson@redhat.com> <1403014378-4349-14-git-send-email-gbenson@redhat.com> <53A072D9.5010802@redhat.com> <20140618113323.GC30541@blade.nx> In-Reply-To: <20140618113323.GC30541@blade.nx> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-06/txt/msg00651.txt.bz2 On 06/18/2014 12:33 PM, Gary Benson wrote: > Pedro Alves wrote: >> On 06/17/2014 03:12 PM, Gary Benson wrote: >>> This commit moves macros required by the soon-to-be-created >>> nat/i386-dregs.c into i386-{nat,low}.h. >> >> To get rid of the remaining '#ifdef GDBSERVER's in the new >> i386-dregs.c, we could make gdbserver use the i386_dr_low >> vector too. Did you look into that? > > I'm not 100% sure I know what you mean. The only '#ifdef GDBSERVER's > in i386-dregs.c are the one surrounding the #include files and the > one surrounding debug_printf. Yes, that one. The ideal end state builds the exact same code in gdb and gdbserver. > > It would be possible to make gdbserver use the i386_dr_low vector and > remove the macros from i386-{nat,low}.h, but you'd have to change the > function signatures in either gdb or gdbserver as the i386_dr_low > "set" functions take an argument (what to set it to) but the functions > in gdbserver don't. I think in gdbserver they all get set at once, > but I have to confess I don't fully understand it yet. Normalizing this is fine, and actually desirable. Reducing divergence is what we're really after. > I'll think about this some more. Thanks. -- Pedro Alves