From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 425 invoked by alias); 22 Apr 2002 16:08:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 418 invoked from network); 22 Apr 2002 16:08:18 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 22 Apr 2002 16:08:18 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 1481D59D36F; Mon, 22 Apr 2002 18:08:18 +0200 (CEST) Received: from suse.cz (leviathan.suse.cz [10.20.1.56]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g3MG8If26574; Mon, 22 Apr 2002 18:08:18 +0200 X-Authentication-Warning: chimera.suse.cz: Host leviathan.suse.cz [10.20.1.56] claimed to be suse.cz Message-ID: <3CC43569.1040008@suse.cz> Date: Mon, 22 Apr 2002 09:08:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] New bitflags type and eflags on i386/x86-64 References: <3CC42916.9080001@suse.cz> <20020422114523.A6524@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00799.txt.bz2 Daniel Jacobowitz wrote: > On Mon, Apr 22, 2002 at 05:15:34PM +0200, Michal Ludvig wrote: > >>Hi all, >>I've created a new typecode TYPE_CODE_FLAGS with appropriate functions >>and used it in builtin_type_i386_eflags type. I did this to be able to >>print i386's and x86-64's FLAGS register in a symbolic form, instead of >>printing it in a hexadecimal and decimal notation. >> > First of all, please include ChangeLog entries; it makes patches easier > to digest quickly. I did a while later (as soon as I noticed it went without ChangeLog). > Second, I see that you assume a TYPE_CODE_FLAGS type is the size of a > long. I'm not fond of that. unpack_long() returns type LONGEST. IMHO it is the biggest integer I can have, isn't it? I don't assume it is just 'long'... > I would prefer if you instead added > support to c-valprint.c for something like Pascal's TYPE_CODE_SET (see > p-valprint.c) and used that. It should be exactly what you're looking > for. Basically, you create an enum describing the bit position (not > mask) for each flag, and then call create_set_type with that type as > the domain_type. I was about to use TYPE_CODE_SET, but I don't know how to add names to its elements. With FLAGS they are written during initialization. Also FLAGS is more simple than SET appears to be. Unfortunately I used pascal too long ago to remember how the set type behaves like... Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz