Introduce common/common-exceptions.[ch]
authorGary Benson <gbenson@redhat.com>
Thu, 7 Aug 2014 15:29:19 +0000 (16:29 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 29 Aug 2014 09:53:37 +0000 (10:53 +0100)
commitff55e1b54898ca4e2a90c005749505e33e32215c
tree445dd77a23a2d18135ab85c5bea45efeaa7e5ef2
parente9bcb6585201ab674d90d714295f63b40da41f16
Introduce common/common-exceptions.[ch]

This commit moves the exception throwing and catching code
into gdb/common/.  All exception printing code remains in
gdb/exceptions.[ch].

gdb/ChangeLog:

* common/common-exceptions.h: New file.
* common/common-exceptions.c: Likewise.
* Makefile.in (SFILES): Add common/common-exceptions.c.
(HFILES_NO_SRCDIR): Add common/common-exceptions.h.
(COMMON_OBS): Add common-exceptions.o.
(common-exceptions.o): New rule.
* exceptions.h (common-exceptions.h): Include.
(gdb_setjmp.h): Do not include.
(return_reason): Moved to common-exceptions.h.
(enum return_reason): Likewise.
(RETURN_MASK): Likewise.
(typedef return_mask): Likewise.
(enum errors): Likewise.
(struct gdb_exception): Likewise.
(exceptions_state_mc_init): Likewise.
(exceptions_state_mc_action_iter): Likewise.
(exceptions_state_mc_action_iter_1): Likewise.
(TRY_CATCH): Likewise.
(throw_exception): Likewise.
(throw_verror): Likewise.
(throw_vquit): Likewise.
(throw_error): Likewise.
(throw_quit): Likewise.
* exceptions.c (enum catcher_state): Moved to common-exceptions.c.
(enum catcher_action): Likewise.
(struct catcher): Likewise.
(current_catcher): Likewise.
(catcher_list_size): Likewise.
(exceptions_state_mc_init): Likewise.
(catcher_pop): Likewise.
(exceptions_state_mc): Likewise.
(exceptions_state_mc_action_iter): Likewise.
(exceptions_state_mc_action_iter_1): Likewise.
(throw_exception): Likewise.
(exception_messages): Likewise.
(exception_messages_size): Likewise.
(throw_it): Likewise.
(throw_verror): Likewise.
(throw_vquit): Likewise.
(throw_error): Likewise.
(throw_quit): Likewise.
(prepare_to_throw_exception): New function.

gdb/gdbserver/ChangeLog:

* Makefile.in (SFILES): Add common/common-exceptions.c.
(OBS): Add common-exceptions.o.
(common-exceptions.o): New rule.
* utils.c (prepare_to_throw_exception): New function.
gdb/ChangeLog
gdb/Makefile.in
gdb/common/common-exceptions.c [new file with mode: 0644]
gdb/common/common-exceptions.h [new file with mode: 0644]
gdb/exceptions.c
gdb/exceptions.h
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in
gdb/gdbserver/utils.c