From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14176 invoked by alias); 29 Aug 2007 18:06:15 -0000 Received: (qmail 14164 invoked by uid 22791); 29 Aug 2007 18:06:14 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Aug 2007 18:06:07 +0000 Received: (qmail 12278 invoked from network); 29 Aug 2007 18:06:05 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Aug 2007 18:06:05 -0000 To: gdb-patches@sourceware.org Subject: RFA: Delete broken and unused HPUXHPPA code From: Jim Blandy Date: Wed, 29 Aug 2007 18:06:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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: 2007-08/txt/msg00514.txt.bz2 The #ifdef block this patch deletes contains unbalanced parenthesis; it wouldn't compile. The mistake was introduced by this change: 2005-02-10 Andrew Cagney Mark up all error and warning messages. Since nobody has noticed it, it's clear that nobody has compiled this code with HPUXHPPA defined for two and a half years. The block of code itself dates from GDB's prehistory. This is the only "HPUXHPPA" block in all of GDB. Can we delete the code? gdb/ChangeLog: 2007-08-29 Jim Blandy * breakpoint.c (watch_command_1): Remove '#ifdef HPUXHPPA' block; this code has not been compiled for two years. Index: gdb/breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.262 diff -u -r1.262 breakpoint.c --- gdb/breakpoint.c 23 Aug 2007 18:08:26 -0000 1.262 +++ gdb/breakpoint.c 29 Aug 2007 18:01:36 -0000 @@ -5767,28 +5767,6 @@ error (_("Target can only support one kind of HW watchpoint at a time.")); } -#if defined(HPUXHPPA) - /* On HP-UX if you set a h/w - watchpoint before the "run" command, the inferior dies with a e.g., - SIGILL once you start it. I initially believed this was due to a - bad interaction between page protection traps and the initial - startup sequence by the dynamic linker. - - However, I tried avoiding that by having HP-UX's implementation of - TARGET_CAN_USE_HW_WATCHPOINT return FALSE if there was no inferior_ptid - yet, which forced slow watches before a "run" or "attach", and it - still fails somewhere in the startup code. - - Until I figure out what's happening, I'm disallowing watches altogether - before the "run" or "attach" command. We'll tell the user they must - set watches after getting the program started. */ - if (!target_has_execution) - { - warning (_("can't do that without a running program; try \"break main\"), \"run\" first"); - return; - } -#endif /* HPUXHPPA */ - /* Change the type of breakpoint to an ordinary watchpoint if a hardware watchpoint could not be set. */ if (!mem_cnt || target_resources_ok <= 0)