aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-04-14 14:16:56 +0000
committerJeff Law <law@redhat.com>1994-04-14 14:16:56 +0000
commit6bc194d2b5abdee62c438dd1d68ba7a101cfe145 (patch)
treee6af6633e27677e6f83e51466d10e5b65f94933f /gdb/procfs.c
parente6b8a17192da0b6aec983736388451a070b64319 (diff)
downloadgdb-6bc194d2b5abdee62c438dd1d68ba7a101cfe145.zip
gdb-6bc194d2b5abdee62c438dd1d68ba7a101cfe145.tar.gz
gdb-6bc194d2b5abdee62c438dd1d68ba7a101cfe145.tar.bz2
* procfs.c (procfs_wait): Protect watchpoint code with appropriate
#ifdefs. (procfs_set_watchpoint, procfs_stopped_by_watchpoint): Likewise.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 3d82e23..0a7171b 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -3538,6 +3538,7 @@ procfs_can_run ()
{
return(1);
}
+#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT
/* Insert a watchpoint */
int
@@ -3582,11 +3583,21 @@ procfs_stopped_by_watchpoint(pid)
why = pi->prstatus.pr_why;
what = pi->prstatus.pr_what;
if (why == PR_FAULTED
- && (what == FLTWATCH) || (what == FLTKWATCH))
+#if defined (FLTWATCH) && defined (FLTKWATCH)
+ && (what == FLTWATCH) || (what == FLTKWATCH)
+#else
+#ifdef FLTWATCH
+ && (what == FLTWATCH)
+#endif
+#ifdef FLTKWATCH
+ && (what == FLTKWATCH)
+#endif
+ )
return what;
}
return 0;
}
+#endif
struct target_ops procfs_ops = {