From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19362 invoked by alias); 9 Apr 2010 16:10:57 -0000 Received: (qmail 19350 invoked by uid 22791); 9 Apr 2010 16:10:55 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Apr 2010 16:10:48 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o39GAiLj054854 for ; Fri, 9 Apr 2010 18:10:44 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o39GAiMl048201 for ; Fri, 9 Apr 2010 18:10:44 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o39GAiJu020394 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 9 Apr 2010 18:10:44 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFC] ARI fixes: Remove NAT_FILE for solaris Date: Fri, 09 Apr 2010 16:10:00 -0000 Message-ID: <001501cad7ff$3950cf30$abf26d90$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00256.txt.bz2 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 * 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 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 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 . */ - -#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