From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12703 invoked by alias); 21 Oct 2013 15:37:54 -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 12673 invoked by uid 89); 21 Oct 2013 15:37:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Oct 2013 15:37:53 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9LFbpD9011806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Oct 2013 11:37:52 -0400 Received: from redhat.brq.redhat.com (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9LFbRJ2025201; Mon, 21 Oct 2013 11:37:50 -0400 From: Ondrej Oprala To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 18/18] un-nest enum pvk Date: Mon, 21 Oct 2013 15:37:00 -0000 Message-Id: <1382369846-5817-19-git-send-email-ooprala@redhat.com> In-Reply-To: <1382369846-5817-1-git-send-email-ooprala@redhat.com> References: <1382369846-5817-1-git-send-email-ooprala@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00654.txt.bz2 From: Tom Tromey gdb/ChangeLog: 2013-10-09 Tom Tromey * prologue-value.h (enum pvk): Moved out from ... (struct prologue_value): ... here. --- gdb/prologue-value.h | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/gdb/prologue-value.h b/gdb/prologue-value.h index b8ed813..af7728e 100644 --- a/gdb/prologue-value.h +++ b/gdb/prologue-value.h @@ -19,6 +19,28 @@ #ifndef PROLOGUE_VALUE_H #define PROLOGUE_VALUE_H +/* What sort of value is this? This determines the interpretation + of subsequent fields. */ +enum pvk { + + /* We don't know anything about the value. This is also used for + values we could have kept track of, when doing so would have + been too complex and we don't want to bother. The bottom of + our lattice. */ + pvk_unknown, + + /* A known constant. K is its value. */ + pvk_constant, + + /* The value that register REG originally had *UPON ENTRY TO THE + FUNCTION*, plus K. If K is zero, this means, obviously, just + the value REG had upon entry to the function. REG is a GDB + register number. Before we start interpreting, we initialize + every register R to { pvk_register, R, 0 }. */ + pvk_register, + +}; + /* When we analyze a prologue, we're really doing 'abstract interpretation' or 'pseudo-evaluation': running the function's code in simulation, but using conservative approximations of the values @@ -118,27 +140,7 @@ struct prologue_value { - /* What sort of value is this? This determines the interpretation - of subsequent fields. */ - enum { - - /* We don't know anything about the value. This is also used for - values we could have kept track of, when doing so would have - been too complex and we don't want to bother. The bottom of - our lattice. */ - pvk_unknown, - - /* A known constant. K is its value. */ - pvk_constant, - - /* The value that register REG originally had *UPON ENTRY TO THE - FUNCTION*, plus K. If K is zero, this means, obviously, just - the value REG had upon entry to the function. REG is a GDB - register number. Before we start interpreting, we initialize - every register R to { pvk_register, R, 0 }. */ - pvk_register, - - } kind; + enum pvk kind; /* The meanings of the following fields depend on 'kind'; see the comments for the specific 'kind' values. */ -- 1.8.3.1