aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread-db.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/thread-db.c')
-rw-r--r--gdb/thread-db.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 9244643..a704924 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -482,7 +482,9 @@ thread_db_new_objfile (struct objfile *objfile)
{
td_err_e err;
- if (objfile == NULL)
+ /* Don't attempt to use thread_db on targets which can not run
+ (core files). */
+ if (objfile == NULL || !target_has_execution)
{
/* All symbols have been discarded. If the thread_db target is
active, deactivate it now. */