diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-20 15:12:53 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-20 15:12:53 +0000 |
commit | 356f33e36a0c597769f03dc2ce7b6e5953cab85c (patch) | |
tree | cc90cae7495eeb12922cd8cd78d5eae1d96438b9 /gdb/exceptions.h | |
parent | c68c091dc292c9df749bfdbc9f9e455c4768dfcf (diff) | |
download | gdb-356f33e36a0c597769f03dc2ce7b6e5953cab85c.tar.gz |
fix PR python/15816
This fixes PR python/15816.
The bug here is that python-selftest.exp can fail:
No symbol "RETURN_MASK_ALL" in current context.
RETURN_MASK_ALL is a macro, so if macros do not end up in the
debuginfo (very typical) then the test fails.
It seemed simplest to me to simply turn the RETURN_MASK_ defines into
enum constants. This way they end up in the debuginfo and all is
well.
PR python/15816:
* exceptions.h (return_mask): Now an enum.
(RETURN_MASK_QUIT, RETURN_MASK_ERROR, RETURN_MASK_ALL): Now
enum constants.
Built and regtested on x86-64 Fedora 18.
Diffstat (limited to 'gdb/exceptions.h')
-rw-r--r-- | gdb/exceptions.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/exceptions.h b/gdb/exceptions.h index bf418608449..129d29a62ad 100644 --- a/gdb/exceptions.h +++ b/gdb/exceptions.h @@ -38,10 +38,13 @@ enum return_reason }; #define RETURN_MASK(reason) (1 << (int)(-reason)) -#define RETURN_MASK_QUIT RETURN_MASK (RETURN_QUIT) -#define RETURN_MASK_ERROR RETURN_MASK (RETURN_ERROR) -#define RETURN_MASK_ALL (RETURN_MASK_QUIT | RETURN_MASK_ERROR) -typedef int return_mask; + +typedef enum +{ + RETURN_MASK_QUIT = RETURN_MASK (RETURN_QUIT), + RETURN_MASK_ERROR = RETURN_MASK (RETURN_ERROR), + RETURN_MASK_ALL = (RETURN_MASK_QUIT | RETURN_MASK_ERROR) +} return_mask; /* Describe all exceptions. */ |