aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-08-18 11:04:30 +0100
committerPedro Alves <palves@redhat.com>2015-08-18 11:04:30 +0100
commitb2a33439909493f5bf93ada871bd588f365d61f4 (patch)
tree86c6fa241c8e7f7cc89cc1eaa323e690f5b3a2a2
parentfe875424a05df7c4055cd9382ab76f65e952c4dd (diff)
downloadfsf-binutils-gdb-b2a33439909493f5bf93ada871bd588f365d61f4.zip
fsf-binutils-gdb-b2a33439909493f5bf93ada871bd588f365d61f4.tar.gz
fsf-binutils-gdb-b2a33439909493f5bf93ada871bd588f365d61f4.tar.bz2
x86/Linux: disable all-stop on top of non-stop
Markus reported that ASNS breaks target record-btrace. In particular, the gdb.btrace/multi-thread-step.exp test fails (both with BTS and PT tracing) with a crash in py-inferior.c: Program received signal SIGSEGV, Segmentation fault. 0x00000000006aa40d in add_thread_object (tp=0x27d32d0) at /users/mmetzger/team/gdb/git/gdb/python/py-inferior.c:337 337 entry->next = inf_obj->threads; My machine doesn't support BTS nor PT, so I missed this... Disabling ASNS temporarily on x86 until this is addressed. Tested on x86_64 Fedora 20. gdb/ChangeLog: 2015-08-18 Pedro Alves <palves@redhat.com> * linux-nat.c (linux_nat_always_non_stop_p): If the linux_ops target implements to_always_non_stop_p, call it. * x86-linux-nat.c (x86_linux_always_non_stop_p): New function. (x86_linux_create_target): Install it as to_always_non_stop_p method.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/linux-nat.c2
-rw-r--r--gdb/x86-linux-nat.c11
3 files changed, 21 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index be2ed47..38872b1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2015-08-18 Pedro Alves <palves@redhat.com>
+
+ * linux-nat.c (linux_nat_always_non_stop_p): If the linux_ops
+ target implements to_always_non_stop_p, call it.
+ * x86-linux-nat.c (x86_linux_always_non_stop_p): New function.
+ (x86_linux_create_target): Install it as to_always_non_stop_p
+ method.
+
2015-08-17 Doug Evans <dje@google.com>
* ui-out.c (default_ui_out_impl): Add comment.
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index be7a915..a13fb9e 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -4594,6 +4594,8 @@ linux_nat_supports_non_stop (struct target_ops *self)
static int
linux_nat_always_non_stop_p (struct target_ops *self)
{
+ if (linux_ops->to_always_non_stop_p != NULL)
+ return linux_ops->to_always_non_stop_p (linux_ops);
return 1;
}
diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c
index 34a9257..fe52c1f 100644
--- a/gdb/x86-linux-nat.c
+++ b/gdb/x86-linux-nat.c
@@ -357,6 +357,15 @@ x86_linux_get_thread_area (pid_t pid, void *addr, unsigned int *base_addr)
}
+/* to_always_non_stop_p implementation. */
+
+static int
+x86_linux_always_non_stop_p (struct target_ops *self)
+{
+ /* Enabling this breaks the btrace target. */
+ return 0;
+}
+
/* Create an x86 GNU/Linux target. */
struct target_ops *
@@ -389,6 +398,8 @@ x86_linux_create_target (void)
t->to_read_btrace = x86_linux_read_btrace;
t->to_btrace_conf = x86_linux_btrace_conf;
+ t->to_always_non_stop_p = x86_linux_always_non_stop_p;
+
return t;
}