From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17194 invoked by alias); 9 Oct 2013 17:18:13 -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 17149 invoked by uid 89); 9 Oct 2013 17:18:13 -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; Wed, 09 Oct 2013 17:18:12 +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 r99HIAaU000474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Oct 2013 13:18:11 -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 r99HHgcO010424; Wed, 9 Oct 2013 13:18:09 -0400 From: Ondrej Oprala To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 18/18] un-nest enum pvk Date: Wed, 09 Oct 2013 17:18:00 -0000 Message-Id: <1381339053-14519-19-git-send-email-ooprala@redhat.com> In-Reply-To: <1381339053-14519-1-git-send-email-ooprala@redhat.com> References: <1381339053-14519-1-git-send-email-ooprala@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00307.txt.bz2 From: Tom Tromey * prologue-value.h (pvk) : Unbundle it from struct prologue_value. --- gdb/ChangeLog | 4 ++++ gdb/prologue-value.h | 44 +++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 802cc88..ed77894 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -17,6 +17,10 @@ 2013-10-09 Tom Tromey + * prologue-value.h (pvk) : Unbundle it from struct prologue_value. + +2013-10-09 Tom Tromey + * gdbarch.c (byte_order) : Change type. (byte_order_for_code) : Likewise. (gdbarch_byte_order) : Change type of the return value. 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