From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18056 invoked by alias); 20 Sep 2009 18:00:45 -0000 Received: (qmail 18045 invoked by uid 22791); 20 Sep 2009 18:00:43 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Sep 2009 18:00:39 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 53DBA10EA2; Sun, 20 Sep 2009 18:00:37 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 3C02C10DA8; Sun, 20 Sep 2009 18:00:37 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MpQiC-0005Jr-Ig; Sun, 20 Sep 2009 14:00:36 -0400 Date: Sun, 20 Sep 2009 18:00:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [RFC] printing/setting flag register fields Message-ID: <20090920180036.GA19867@caradoc.them.org> Mail-Followup-To: Doug Evans , gdb-patches@sourceware.org References: <20090918235632.0DDC6843AC@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090918235632.0DDC6843AC@ruffy.mtv.corp.google.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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: 2009-09/txt/msg00644.txt.bz2 On Fri, Sep 18, 2009 at 04:56:32PM -0700, Doug Evans wrote: > Hi. > > Before I go too far down this path, I'm looking for early feedback. > > What do folks think? Just my two cents - flag types were a workaround for GDB's lack of good pretty-printing facilities. They should be just structs containing bitfields, with a default pretty-printer. And/or a union with an accessible integer value. Anywhere that our handling of such constructs isn't good enough for eflags, it's not good enough for user code either, and I deal with a lot of code of this nature. As for bitfield numbering, I think we should use the corresponding architecture's conventions; I don't know what the m68k complication is, though. -- Daniel Jacobowitz CodeSourcery