summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2000-12-26 20:38:46 +0000
committerjoerg <joerg@FreeBSD.org>2000-12-26 20:38:46 +0000
commit05c5536b8f879bbe3cc597b1384a7e46d6f440d3 (patch)
tree8837b20bafd17b2f8779639bf1350e31c500509f /gnu
parentfd223545d4ce7c8c6fe4896ce1eb916f587f77a8 (diff)
downloadFreeBSD-src-05c5536b8f879bbe3cc597b1384a7e46d6f440d3.zip
FreeBSD-src-05c5536b8f879bbe3cc597b1384a7e46d6f440d3.tar.gz
Fix an annoying message ``gdb: ptrace(PT_GETDBREGS) failed: No such process''
when using gdb on a remote target. The fix is to restrict PT_GETDBREGS calls to `child' and `freebsd-uthreads' targets solely. I've been in some conversation with Brian about this, and this solution seems to be the most appropriate one. PR: gnu/21685 Submitted by: bsd
Diffstat (limited to 'gnu')
-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