diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-27 14:32:49 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-04-28 09:31:15 -0600 |
commit | 0d1703b8fb611f978577a70ad6aa308a12a53980 (patch) | |
tree | 1575fb753e121f86566507be66b72cd85efc013e /gdb/nat | |
parent | c42dd30d73ec441ed9cab207597c7f5ce88ee231 (diff) | |
download | gdb-0d1703b8fb611f978577a70ad6aa308a12a53980.zip gdb-0d1703b8fb611f978577a70ad6aa308a12a53980.tar.gz gdb-0d1703b8fb611f978577a70ad6aa308a12a53980.tar.bz2 |
Remove "typedef enum ..."
I noticed a few spots in GDB that use "typedef enum". However, in C++
this isn't as useful, as the tag is automatically entered as a
typedef. This patch removes most uses of "typedef enum" -- the
exceptions being in some nat-* code I can't compile, and
glibc_thread_db.h, which I think is more or less a copy of some C code
from elsewhere.
Tested by rebuilding.
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/windows-nat.h | 4 | ||||
-rw-r--r-- | gdb/nat/x86-dregs.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 29fd0a3..27b6536 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -129,12 +129,12 @@ struct pending_stop DEBUG_EVENT event; }; -typedef enum +enum handle_exception_result { HANDLE_EXCEPTION_UNHANDLED = 0, HANDLE_EXCEPTION_HANDLED, HANDLE_EXCEPTION_IGNORED -} handle_exception_result; +}; /* A single Windows process. An object of this type (or subclass) is created by the client. Some methods must be provided by the client diff --git a/gdb/nat/x86-dregs.c b/gdb/nat/x86-dregs.c index 230b99c..94de026 100644 --- a/gdb/nat/x86-dregs.c +++ b/gdb/nat/x86-dregs.c @@ -206,7 +206,7 @@ x86_get_debug_register_length () #define X86_DR_WATCH_HIT(dr6, i) ((dr6) & (1 << (i))) /* Types of operations supported by x86_handle_nonaligned_watchpoint. */ -typedef enum { WP_INSERT, WP_REMOVE, WP_COUNT } x86_wp_op_t; +enum x86_wp_op_t { WP_INSERT, WP_REMOVE, WP_COUNT }; /* Print the values of the mirrored debug registers. */ |