This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 24/36] breakpoint.h: move enum âprint_stop_actionâ
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 9 Feb 2015 23:20:34 +0000
- Subject: [PATCH 24/36] breakpoint.h: move enum âprint_stop_actionâ
- Authentication-results: sourceware.org; auth=none
- References: <1423524046-20605-1-git-send-email-palves at redhat dot com>
Building GDB in C++, we get:
src/gdb/breakpoint.h:529:8: error: use of enum âprint_stop_actionâ without previous declaration
We can forward declare enums in C++.
gdb/ChangeLog:
2015-02-09 Pedro Alves <palves@redhat.com>
* breakpoint.h (enum print_stop_action): Move further up in the
file.
---
gdb/breakpoint.h | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
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);
--
1.9.3