From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13775 invoked by alias); 2 May 2012 21:50:10 -0000 Received: (qmail 13765 invoked by uid 22791); 2 May 2012 21:50:08 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 May 2012 21:49:53 +0000 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 q42LnSwr021177; Wed, 2 May 2012 23:49:28 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q42LnOLM031429; Wed, 2 May 2012 23:49:24 +0200 (CEST) Date: Wed, 02 May 2012 21:50:00 -0000 Message-Id: <201205022149.q42LnOLM031429@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20120502212726.GA24839@adacore.com> (message from Joel Brobecker on Wed, 2 May 2012 14:27:26 -0700) Subject: Re: Invalid segment resister value on x86_64-windows References: <1335913461-1628-1-git-send-email-brobecker@adacore.com> <201205021009.q42A9G4s021744@glazunov.sibelius.xs4all.nl> <20120502175724.GW10958@adacore.com> <201205022044.q42KiQLc021611@glazunov.sibelius.xs4all.nl> <20120502212612.GB15555@adacore.com> <20120502212726.GA24839@adacore.com> 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: 2012-05/txt/msg00036.txt.bz2 > Date: Wed, 2 May 2012 14:27:26 -0700 > From: Joel Brobecker > > [ENOPATCH] > > > > Hmm, it should be possible to do this without changing any of the > > > -tdep.c code, but if you prefer to do it this way, can you rename the > > > new field into cs_regnum, change the comment into "Register number for > > > %cs", and move it somewhere around the other _regnum variables that > > > are already part of the struct? That makes things a bit more > > > consistent. > > > > If you prefer, I can do something similar to what we do to handle > > the register mapping. Attached is a patch that does that, and only > > touches windows *-nat code. Untested for now; will test and add > > a ChangeLog if this is your prefered approach. > > > > This can be simplified a little further and have everything done > > in windows-nat.c, but it would probably be considered uglier: > > include "i386-tdep.h" and "amd64-tdep.h" in windows-nat.c, and > > then have a quick check to determine which platform we are, and > > then set then implement the segment_register_p function using either > > a check on sizeof (void *), or a #ifdef [...] #else [...]... > > -- > Joel I don't really care about the native Windows support bits. If Chris is happy with this, I'd say go for it.