summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c b/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
index 6d6cd7a..3fff89e 100644
--- a/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
+++ b/gnu/usr.bin/binutils/gdb/i386/freebsd-nat.c
@@ -478,6 +478,11 @@ stopped_by_watchpoint()
{
struct dbreg dbr;
extern int inferior_pid;
+
+ if (current_target.to_shortname == 0 ||
+ ! (strcmp(current_target.to_shortname, "child") == 0 ||
+ strcmp(current_target.to_shortname, "freebsd-uthreads") == 0))
+ return 0;
if (inferior_pid != 0 && core_bfd == NULL)
{
@@ -512,6 +517,11 @@ insert_watchpoint(addr, len, type)
struct dbreg dbr;
extern int inferior_pid;
+ if (current_target.to_shortname == 0 ||
+ ! (strcmp(current_target.to_shortname, "child") == 0 ||
+ strcmp(current_target.to_shortname, "freebsd-uthreads") == 0))
+ return 0;
+
if (inferior_pid != 0 && core_bfd == NULL)
{
int pid = inferior_pid & ((1 << 17) - 1); /* XXX extract pid from tid */
@@ -607,6 +617,11 @@ remove_watchpoint(addr, len, type)
struct dbreg dbr;
extern int inferior_pid;
+ if (current_target.to_shortname == 0 ||
+ ! (strcmp(current_target.to_shortname, "child") == 0 ||
+ strcmp(current_target.to_shortname, "freebsd-uthreads") == 0))
+ return 0;
+
if (inferior_pid != 0 && core_bfd == NULL)
{
int pid = inferior_pid & ((1 << 17) - 1); /* XXX extract pid from tid */
OpenPOWER on IntegriCloud