This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 18/18] un-nest enum pvk
- From: Ondrej Oprala <ooprala at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Wed, 9 Oct 2013 19:17:33 +0200
- Subject: [PATCH 18/18] un-nest enum pvk
- Authentication-results: sourceware.org; auth=none
- References: <1381339053-14519-1-git-send-email-ooprala at redhat dot com>
From: Tom Tromey <tromey@redhat.com>
* 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 <tromey@redhat.com>
+ * prologue-value.h (pvk) : Unbundle it from struct prologue_value.
+
+2013-10-09 Tom Tromey <tromey@redhat.com>
+
* 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