diff options
author | Pedro Alves <palves@redhat.com> | 2016-04-21 17:43:46 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-04-22 00:49:05 +0100 |
commit | da2d05ee3cae3aeee6f7c89fa5787e700cfae27d (patch) | |
tree | 5cb3a6121b4853bb6c825eebedbd8a41d66fc14b | |
parent | 71a6675d992812e4fdbc1bf602d7bb8297d907e2 (diff) | |
download | binutils-gdb-users/palves/rl-foreign-frame.tar.gz |
Switch gdb's TRY/CATCH to C++ try/catchusers/palves/rl-foreign-frame
The exceptions-across-readline issue was fixed by the previous commit.
Let's try this again.
gdb/ChangeLog:
2016-04-21 Pedro Alves <palves@redhat.com>
* common/common-exceptions.h (GDB_XCPT_TRY): Remove mention of
the foreign frames issue.
[__cplusplus] (GDB_XCPT): Define as GDB_XCPT_TRY.
-rw-r--r-- | gdb/common/common-exceptions.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h index 4a9f6757f13..ed1cf5e126c 100644 --- a/gdb/common/common-exceptions.h +++ b/gdb/common/common-exceptions.h @@ -122,9 +122,7 @@ struct gdb_exception the only mode supported when GDB is built as a C program. */ #define GDB_XCPT_SJMP 1 -/* Make GDB exceptions use try/catch behind the scenes. Can't be made - the default until we handle exceptions crossing foreign frames - (gdb -> readline callback -> gdb -> error). */ +/* Make GDB exceptions use try/catch behind the scenes. */ #define GDB_XCPT_TRY 2 /* Specify this mode to build with TRY/CATCH mapped directly to raw @@ -133,8 +131,11 @@ struct gdb_exception spurious code between the TRY and the CATCH block. */ #define GDB_XCPT_RAW_TRY 3 -/* Always use setjmp/longmp, even in C++ mode. */ -#define GDB_XCPT GDB_XCPT_SJMP +#ifdef __cplusplus +# define GDB_XCPT GDB_XCPT_TRY +#else +# define GDB_XCPT GDB_XCPT_SJMP +#endif /* Functions to drive the sjlj-based exceptions state machine. Though declared here by necessity, these functions should be considered |