aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-07 16:29:19 +0100
committerGary Benson <gbenson@redhat.com>2014-08-29 10:53:37 +0100
commitff55e1b54898ca4e2a90c005749505e33e32215c (patch)
tree445dd77a23a2d18135ab85c5bea45efeaa7e5ef2 /gdb/gdbserver
parente9bcb6585201ab674d90d714295f63b40da41f16 (diff)
downloadgdb-ff55e1b54898ca4e2a90c005749505e33e32215c.zip
gdb-ff55e1b54898ca4e2a90c005749505e33e32215c.tar.gz
gdb-ff55e1b54898ca4e2a90c005749505e33e32215c.tar.bz2
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.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/Makefile.in7
-rw-r--r--gdb/gdbserver/utils.c8
3 files changed, 21 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 453854e..89cafa6 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,12 @@
2014-08-29 Gary Benson <gbenson@redhat.com>
+ * 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.
+
+2014-08-29 Gary Benson <gbenson@redhat.com>
+
* config.in: Regenerate.
* configure: Likewise.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index f130082..21ac6f2 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -170,7 +170,8 @@ SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \
$(srcdir)/common/filestuff.c $(srcdir)/target/waitstatus.c \
$(srcdir)/nat/mips-linux-watch.c $(srcdir)/common/print-utils.c \
$(srcdir)/common/rsp-low.c $(srcdir)/common/errors.c \
- $(srcdir)/common/common-debug.c $(srcdir)/common/cleanups.c
+ $(srcdir)/common/common-debug.c $(srcdir)/common/cleanups.c \
+ $(srcdir)/common/common-exceptions.c
DEPFILES = @GDBSERVER_DEPFILES@
@@ -184,6 +185,7 @@ OBS = agent.o ax.o inferiors.o regcache.o remote-utils.o server.o signals.o \
mem-break.o hostio.o event-loop.o tracepoint.o xml-utils.o \
common-utils.o ptid.o buffer.o format.o filestuff.o dll.o notif.o \
tdesc.o print-utils.o rsp-low.o errors.o common-debug.o cleanups.o \
+ common-exceptions.o \
$(XML_BUILTIN) $(DEPFILES) $(LIBOBJS)
GDBREPLAY_OBS = gdbreplay.o version.o
GDBSERVER_LIBS = @GDBSERVER_LIBS@
@@ -547,6 +549,9 @@ common-debug.o: ../common/common-debug.c
cleanups.o: ../common/cleanups.c
$(COMPILE) $<
$(POSTCOMPILE)
+common-exceptions.o: ../common/common-exceptions.c
+ $(COMPILE) $<
+ $(POSTCOMPILE)
waitstatus.o: ../target/waitstatus.c
$(COMPILE) $<
$(POSTCOMPILE)
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index 244e114..e310b9e 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -141,3 +141,11 @@ pfildes (gdb_fildes_t fd)
return plongest (fd);
#endif
}
+
+/* See common/common-exceptions.h. */
+
+void
+prepare_to_throw_exception (void)
+{
+ /* No client-specific actions required. */
+}