From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18384 invoked by alias); 25 Sep 2013 12:47:47 -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 18375 invoked by uid 89); 25 Sep 2013 12:47:46 -0000 Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 25 Sep 2013 12:47:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id r8PClZWP001601; Wed, 25 Sep 2013 14:47:35 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r8PClZat006610; Wed, 25 Sep 2013 14:47:35 +0200 (CEST) Date: Wed, 25 Sep 2013 12:47:00 -0000 Message-Id: <201309251247.r8PClZat006610@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: eliz@gnu.org CC: walfred.tedeschi@intel.com, gdb-patches@sourceware.org In-reply-to: <83eh8dgjxh.fsf@gnu.org> (message from Eli Zaretskii on Wed, 25 Sep 2013 15:33:30 +0300) Subject: Re: [PATCH V4 0/8] Intel(R) MPX register support References: <1378373188-31144-1-git-send-email-walfred.tedeschi@intel.com> <83y57bbo6q.fsf@gnu.org> <83vc2aj6qr.fsf@gnu.org> <83eh8dgjxh.fsf@gnu.org> X-SW-Source: 2013-09/txt/msg00893.txt.bz2 > Date: Wed, 25 Sep 2013 15:33:30 +0300 > From: Eli Zaretskii > > > From: "Tedeschi, Walfred" > > CC: "gdb-patches@sourceware.org" > > Date: Wed, 25 Sep 2013 11:51:23 +0000 > > > > Common code I meant the target dependent files, i.e. amd64-tdep.c and i386-tdep.c. > > > > We added code to support Linux only. Linux registers are processed at amd64-tdep-linux.c and i386-tdep-linux.c as well as amd64-linux-nat.c and i386-linux-nat.c. > > > > In order to implement the same features for windows we should have modified the amd64-tdep-windows and i386-tdep-windows.c and for Darwin amd64-tdep-darwin and i386-tdep-darwin.c for bsd there would be also some change on amd64bsd-native.c and i386bsd-native.c. Additionally we OS support that is still not ready on the other platforms. > > > > I hope to have clarified. > > I'm sorry to insist, but that's exactly my question: why were the > changes done in Linux-specific i386-tdep-linux.c etc., and not in the > CPU-specific i386-tdep.c etc.? These registers are specific to a CPU, > not to an OS, aren't they? Most of the changes are in i386-tdep.c and amd64-tdep.c. The bits that are in *-linux-tdep.c are the bits to support core dumps, which are OS-specific. Although some of those core dump bits might be more generally useful. That's hard to judge though as long as Linux is the only OS that actually has the necessary interfaces for exposing these registers to the debugger.