From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30344 invoked by alias); 3 Jul 2003 20:37:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30337 invoked from network); 3 Jul 2003 20:37:37 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.129.200.2) by sources.redhat.com with SMTP; 3 Jul 2003 20:37:37 -0000 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id D7B47800002 for ; Thu, 3 Jul 2003 16:37:36 -0400 (EDT) Message-ID: <3F049410.70109@redhat.com> Date: Thu, 03 Jul 2003 20:37:00 -0000 From: "J. Johnston" Organization: Red Hat Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: RFA: patch to ia64-linux-nat.c Content-Type: multipart/mixed; boundary="------------060605060709090203040700" X-SW-Source: 2003-07/txt/msg00087.txt.bz2 This is a multi-part message in MIME format. --------------060605060709090203040700 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 542 The attached patch fixes a problem with potential extraneous breakpoints being found by gdb on ia64. The ia64_linux_stopped_by_watchpoint() routine is not verifying that it has a SIGTRAP signal vs other signals and is only checking the si_code being 4. The fix merely adds a check that if the signal is not a SIGTRAP, then we are not at a hardware watchpoint. Ok to commit? 2003-07-03 Jeff Johnston * ia64-linux-nat.c (ia64_linux_stopped_by_watchpoint): Verify that we have a SIGTRAP before returning non-zero. --------------060605060709090203040700 Content-Type: text/plain; name="ia64-linux-nat.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ia64-linux-nat.patch" Content-length: 704 Index: ia64-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/ia64-linux-nat.c,v retrieving revision 1.16 diff -u -p -r1.16 ia64-linux-nat.c --- ia64-linux-nat.c 7 Feb 2003 04:49:34 -0000 1.16 +++ ia64-linux-nat.c 3 Jul 2003 20:31:26 -0000 @@ -634,7 +634,8 @@ ia64_linux_stopped_by_watchpoint (ptid_t errno = 0; ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_ARG3_TYPE) 0, &siginfo); - if (errno != 0 || (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */) + if (errno != 0 || siginfo.si_signo != SIGTRAP || + (siginfo.si_code & 0xffff) != 0x0004 /* TRAP_HWBKPT */) return 0; psr = read_register_pid (IA64_PSR_REGNUM, ptid); --------------060605060709090203040700--