This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] ARI fixes: Remove NAT_FILE for solaris
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 9 Apr 2010 18:10:50 +0200
- Subject: [RFC] ARI fixes: Remove NAT_FILE for solaris
In the series of efforts to get rid of
native headers.
This patch simply removes i386/nm-i386sol2.h
The only remaining code was
#ifdef NEW_PROC_API
#define CANNOT_STEP_HW_WATCHPOINTS
#endif
I moved that into gdb/configure.ac.
The most difficult part was to get all the tools
(in the correct versions) to be able to regenerate
config.in and configure on a solaris machine.
One question might be if this bug is now fixed in
Solaris kernel and if we should not only define this for older kernels.
Does anyone know of some simple code to test
if this bug is still present?
Pierre
2010-04-09 Pierre Muller <muller@ics.u-strasbg.fr>
* configure.ac (solaris): Define CANNOT_STEP_HW_WATCHPOINTS
for i386 processor family.
* config.in: Regenerate.
* configure: Regenerate.
* config/i386/i386sol2.mh: Suppress NAT_FILE.
* config/i386/sol2-64.mh: Suppress NAT_FILE.
* config/i386/nm-i386sol2.h: Delete file.
Index: src/gdb/config.in
===================================================================
RCS file: /cvs/src/src/gdb/config.in,v
retrieving revision 1.116
diff -u -p -r1.116 config.in
--- src/gdb/config.in 10 Mar 2010 18:37:22 -0000 1.116
+++ src/gdb/config.in 9 Apr 2010 15:13:37 -0000
@@ -18,6 +18,9 @@
/* Define to the number of bits in type 'wint_t'. */
#undef BITSIZEOF_WINT_T
+/* Define for Solaris Kernel bug. */
+#undef CANNOT_STEP_HW_WATCHPOINTS
+
/* Define to 1 if the compiler supports long long. */
#undef CC_HAS_LONG_LONG
Index: src/gdb/configure
===================================================================
RCS file: /cvs/src/src/gdb/configure,v
retrieving revision 1.301
diff -u -p -r1.301 configure
--- src/gdb/configure 15 Mar 2010 17:03:01 -0000 1.301
+++ src/gdb/configure 9 Apr 2010 15:13:39 -0000
@@ -11882,6 +11882,12 @@ $as_echo "#define NEW_PROC_API 1" >>conf
$as_echo "#define NEW_PROC_API 1" >>confdefs.h
+# This bug might have been solved, but for which version of solaris system?
+ if test "${gdb_host_cpu}" = "i386"; then
+
+$as_echo "#define CANNOT_STEP_HW_WATCHPOINTS 1" >>confdefs.h
+
+ fi
;;
mips-sgi-irix5*)
# Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
Index: src/gdb/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.116
diff -u -p -r1.116 configure.ac
--- src/gdb/configure.ac 15 Mar 2010 17:03:00 -0000 1.116
+++ src/gdb/configure.ac 9 Apr 2010 15:13:39 -0000
@@ -1035,6 +1035,11 @@ if test "${target}" = "${host}"; then
AC_DEFINE(NEW_PROC_API, 1,
[Define if you want to use new multi-fd /proc interface
(replaces HAVE_MULTIPLE_PROC_FDS as well as other macros).])
+# This bug might have been solved, but for which version of solaris system?
+ if test "${gdb_host_cpu}" = "i386"; then
+ AC_DEFINE(CANNOT_STEP_HW_WATCHPOINTS, 1,
+ [Define for Solaris Kernel bug.])
+ fi
;;
mips-sgi-irix5*)
# Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
Index: src/gdb/config/i386/i386sol2.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/i386sol2.mh,v
retrieving revision 1.12
diff -u -p -r1.12 i386sol2.mh
--- src/gdb/config/i386/i386sol2.mh 26 Oct 2009 18:28:13 -0000 1.12
+++ src/gdb/config/i386/i386sol2.mh 9 Apr 2010 15:13:40 -0000
@@ -1,4 +1,3 @@
# Host: Solaris x86
NATDEPFILES= fork-child.o i386v4-nat.o i386-sol2-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
-NAT_FILE= nm-i386sol2.h
Index: src/gdb/config/i386/nm-i386sol2.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-i386sol2.h,v
retrieving revision 1.19
diff -u -p -r1.19 nm-i386sol2.h
--- src/gdb/config/i386/nm-i386sol2.h 1 Jan 2010 07:31:48 -0000 1.19
+++ src/gdb/config/i386/nm-i386sol2.h 9 Apr 2010 15:13:40 -0000
@@ -1,32 +0,0 @@
-/* Native support for i386 running Solaris 2.
- Copyright 1998, 1999, 2000, 2007, 2008, 2009, 2010
- 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 <http://www.gnu.org/licenses/>.
*/
-
-#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
-
-/* Solaris x86 2.6 and 2.7 targets have a kernel bug when stepping
- over an instruction that causes a page fault without triggering
- a hardware watchpoint. The kernel properly notices that it shouldn't
- stop, because the hardware watchpoint is not triggered, but it forgets
- the step request and continues the program normally.
- Work around the problem by removing hardware watchpoints if a step is
- requested, GDB will check for a hardware watchpoint trigger after the
- step anyway. */
-#define CANNOT_STEP_HW_WATCHPOINTS
-
-#endif /* NEW_PROC_API */
Index: src/gdb/config/i386/sol2-64.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/sol2-64.mh,v
retrieving revision 1.2
diff -u -p -r1.2 sol2-64.mh
--- src/gdb/config/i386/sol2-64.mh 26 Oct 2009 18:28:13 -0000 1.2
+++ src/gdb/config/i386/sol2-64.mh 9 Apr 2010 15:13:40 -0000
@@ -1,4 +1,3 @@
# Host: Solaris x86_64
NATDEPFILES= fork-child.o amd64-nat.o i386v4-nat.o i386-sol2-nat.o \
procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
-NAT_FILE= nm-i386sol2.h