From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3726 invoked by alias); 20 Sep 2009 20:27:06 -0000 Received: (qmail 3713 invoked by uid 22791); 20 Sep 2009 20:27:05 -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 20:26:59 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E951610EA2; Sun, 20 Sep 2009 20:26:57 +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 C12AC10DA8; Sun, 20 Sep 2009 20:26:57 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MpSzo-0000jT-V5; Sun, 20 Sep 2009 16:26:56 -0400 Date: Sun, 20 Sep 2009 20:27:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [RFC] printing/setting flag register fields Message-ID: <20090920202656.GA2321@caradoc.them.org> Mail-Followup-To: Doug Evans , gdb-patches@sourceware.org References: <20090918235632.0DDC6843AC@ruffy.mtv.corp.google.com> <20090920180036.GA19867@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/msg00647.txt.bz2 On Sun, Sep 20, 2009 at 11:35:31AM -0700, Doug Evans wrote: > Should TYPE_CODE_FLAGS be nuked? I'm happy to do that instead if > that's what folks want. I like it, but if we made eflags a union of a > struct and an int, then "set $eflags.ZF = 0" won't work. Are folks > happy with "set $eflags.bits.ZF = 0"? "works for me". IMO what we really want is the struct - but with a way to say "print the whole word-sized struct as a single integer". This is something I need often. I'd like to see "$eflags is 0x12f, which is the A B and C bits", without GDB syntax getting in my way. Yes, that's vague :-) > But it could be done differently. An off-the-cuff example is an > option to ptype to print field offsets for structs in general. [I'm > assuming such a facility doesn't already exist.] That would probably > be more useful than always printing the offsets anyway. I think such an option was submitted, once upon a time. I don't know what became of it. I agree this would be more useful. -- Daniel Jacobowitz CodeSourcery