From d1a7880c7763c73413efe8dd1293d7874b7e0ddd Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sun, 7 Jun 2009 22:33:25 +0000 Subject: 2009-06-07 Pedro Alves * procfs.h: New. * proc-utils.h (procfs_first_available): Don't declare here. * sol-thread.c: Include procfs.h instead of sys/procfs.h and proc-utils.h. * procfs.c: Include procfs.h. (procfs_target): Make it public. Don't register procfs_can_use_hw_breakpoint here. (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS. (procfs_can_use_hw_breakpoint): Remove check of TARGET_HAS_HARDWARE_WATCHPOINTS. (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint here. (_initialize_procfs): Don't add the procfs target here. * i386-sol2-nat.c: Include target.h and procfs.h. (_initialize_amd64_sol2_nat): Install the procfs target here, customized with watchpoints support. * irix5-nat.c: Include target.h. (_initialize_core_irix5): Rename to ... (_initialize_irix5_nat): ... this. Install the procfs target here, customized with watchpoints support. * alpha-nat.c: Include procfs.h. (_initialize_core_alpha): Rename to... (_initialize_alpha_nat): ... this. Install the procfs target here, customized with watchpoints support. * sparc-sol2-nat.c: Include target.h and procfs.h. (_initialize_sparc_sol2_nat): New. * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete. * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete. * config/mips/irix5.mh (NAT_FILE): Delete. * config/mips/irix6.mh (NAT_FILE): Delete. * config/mips/nm-irix5.h: Delete. 2009-06-07 Pedro Alves * gdbint.texinfo (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete all references. --- gdb/procfs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gdb/procfs.h (limited to 'gdb/procfs.h') diff --git a/gdb/procfs.h b/gdb/procfs.h new file mode 100644 index 0000000..6e8b302 --- /dev/null +++ b/gdb/procfs.h @@ -0,0 +1,36 @@ +/* Native debugging support for procfs targets. + + Copyright (C) 2009 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +struct target_ops; + +/* Create a prototype generic procfs target. The client can override + it with local methods. */ + +extern struct target_ops *procfs_target (void); + +/* Call this in the native _initialize routine that creates and + customizes the prototype target returned by procfs_target, if the + native debug interface supports procfs watchpoints. */ + +extern void procfs_use_watchpoints (struct target_ops *t); + +/* Return a ptid for which we guarantee we will be able to find a + 'live' procinfo. */ + +extern ptid_t procfs_first_available (void); -- cgit v1.1