aboutsummaryrefslogtreecommitdiff
path: root/gdb/wrapper.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-04-17 19:12:20 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-04-17 19:12:20 +0000
commit9a845ea22cc25f5346c9d465c9cb206319898bee (patch)
treeab04459b558055bbc5eb2dd08213103254bdf739 /gdb/wrapper.c
parent254f582e7e9b0f5112489bdc7700c3edb0d00a08 (diff)
downloadgdb-9a845ea22cc25f5346c9d465c9cb206319898bee.zip
gdb-9a845ea22cc25f5346c9d465c9cb206319898bee.tar.gz
gdb-9a845ea22cc25f5346c9d465c9cb206319898bee.tar.bz2
gdb/
* corelow.c: Include wrapper.h. (core_open): Call now gdb_target_find_new_threads. * wrapper.c: Include target.h. (gdb_target_find_new_threads): New. * wrapper.h (gdb_target_find_new_threads): New declaration.
Diffstat (limited to 'gdb/wrapper.c')
-rw-r--r--gdb/wrapper.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/wrapper.c b/gdb/wrapper.c
index db3af3f..951e672 100644
--- a/gdb/wrapper.c
+++ b/gdb/wrapper.c
@@ -21,6 +21,7 @@
#include "exceptions.h"
#include "wrapper.h"
#include "ui-out.h"
+#include "target.h"
int
gdb_parse_exp_1 (char **stringptr, struct block *block, int comma,
@@ -161,3 +162,24 @@ gdb_value_struct_elt (struct ui_out *uiout, struct value **result,
return GDB_RC_FAIL;
return GDB_RC_OK;
}
+
+/* Call target_find_new_threads without throwing exception. Exception is
+ printed if it got thrown. */
+
+int
+gdb_target_find_new_threads (void)
+{
+ volatile struct gdb_exception except;
+
+ TRY_CATCH (except, RETURN_MASK_ERROR)
+ {
+ target_find_new_threads ();
+ }
+
+ if (except.reason < 0)
+ {
+ exception_print (gdb_stderr, except);
+ return 0;
+ }
+ return 1;
+}