aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdb.c')
-rw-r--r--gdb/gdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdb.c b/gdb/gdb.c
index 71a3fd1..6e3ff07 100644
--- a/gdb/gdb.c
+++ b/gdb/gdb.c
@@ -19,10 +19,17 @@
#include "defs.h"
#include "main.h"
#include "interps.h"
+#include "run-on-main-thread.h"
int
main (int argc, char **argv)
{
+ /* The first call to is_main_thread () should be from the main thread.
+ If this is the first call, then that requirement is fulfilled here.
+ If this is not the first call, then this verifies that the first call
+ fulfilled that requirement. */
+ gdb_assert (is_main_thread ());
+
struct captured_main_args args;
memset (&args, 0, sizeof args);