This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] breakpoint.h: move enum ‘print_stop_action’
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 27 Feb 2015 17:50:03 -0000
- Subject: [binutils-gdb] breakpoint.h: move enum ‘print_stop_action’
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=64166036b3de842d3e62e9471a2813b55643e3f3
commit 64166036b3de842d3e62e9471a2813b55643e3f3
Author: Pedro Alves <palves@redhat.com>
Date: Wed Oct 22 12:26:06 2014 +0100
breakpoint.h: move enum â??print_stop_actionâ??
Building GDB in C++, we get:
src/gdb/breakpoint.h:529:8: error: use of enum â??print_stop_actionâ?? without previous declaration
We can't forward declare enums in C++.
gdb/ChangeLog:
2015-02-27 Pedro Alves <palves@redhat.com>
* breakpoint.h (enum print_stop_action): Move further up in the
file.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/breakpoint.h | 40 ++++++++++++++++++++--------------------
2 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 110c80b..6d9b1b0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-02-27 Pedro Alves <palves@redhat.com>
+ * breakpoint.h (enum print_stop_action): Move further up in the
+ file.
+
+2015-02-27 Pedro Alves <palves@redhat.com>
+
* gdbarch.sh: Include regcache.h.
* gdbarch.h: Regenerate.
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 100d4f2..ad91102 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -471,6 +471,26 @@ struct bp_location
struct symtab *symtab;
};
+/* The possible return values for print_bpstat, print_it_normal,
+ print_it_done, print_it_noop. */
+enum print_stop_action
+{
+ /* We printed nothing or we need to do some more analysis. */
+ PRINT_UNKNOWN = -1,
+
+ /* We printed something, and we *do* desire that something to be
+ followed by a location. */
+ PRINT_SRC_AND_LOC,
+
+ /* We printed something, and we do *not* desire that something to be
+ followed by a location. */
+ PRINT_SRC_ONLY,
+
+ /* We already printed all we needed to print, don't print anything
+ else. */
+ PRINT_NOTHING
+};
+
/* This structure is a collection of function pointers that, if available,
will be called instead of the performing the default action for this
bptype. */
@@ -966,26 +986,6 @@ struct bpstat_what
int is_longjmp;
};
-/* The possible return values for print_bpstat, print_it_normal,
- print_it_done, print_it_noop. */
-enum print_stop_action
- {
- /* We printed nothing or we need to do some more analysis. */
- PRINT_UNKNOWN = -1,
-
- /* We printed something, and we *do* desire that something to be
- followed by a location. */
- PRINT_SRC_AND_LOC,
-
- /* We printed something, and we do *not* desire that something to
- be followed by a location. */
- PRINT_SRC_ONLY,
-
- /* We already printed all we needed to print, don't print anything
- else. */
- PRINT_NOTHING
- };
-
/* Tell what to do about this bpstat. */
struct bpstat_what bpstat_what (bpstat);