* 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.
+2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * 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.
+
2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-thread-db.c (find_new_threads_callback): Exit on zero TI_TID
#include "filenames.h"
#include "progspace.h"
#include "objfiles.h"
+#include "wrapper.h"
#ifndef O_LARGEFILE
may be a thread_stratum target loaded on top of target core by
now. The layer above should claim threads found in the BFD
sections. */
- target_find_new_threads ();
+ gdb_target_find_new_threads ();
p = bfd_core_file_failing_command (core_bfd);
if (p)
#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,
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;
+}
extern int gdb_parse_and_eval_type (char *, int, struct type **);
+extern int gdb_target_find_new_threads (void);
+
#endif /* wrapper.h */