From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4961 invoked by alias); 26 Jun 2004 15:44:26 -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 4817 invoked from network); 26 Jun 2004 15:44:21 -0000 Received: from unknown (HELO maynard.mail.mindspring.net) (207.69.200.243) by sourceware.org with SMTP; 26 Jun 2004 15:44:21 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by maynard.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BeFLk-0001lF-00; Sat, 26 Jun 2004 11:44:16 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 265CD4B104; Sat, 26 Jun 2004 11:44:20 -0400 (EDT) To: david@streamline-computing.com, gdb-patches@sources.redhat.com Subject: Re: [Patch] x % 0 hangs Message-Id: <20040626154420.265CD4B104@berman.michael-chastain.com> Date: Sat, 26 Jun 2004 15:44:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-06/txt/msg00565.txt.bz2 I like your patch, although I can't approve it. There is a PR for this: http://sources.redhat.com/gdb/bugs/1056 divide by zero hangs gdb Could you a line to your ChangeLog like this: 2004-06-26 Partial fix for PR cli/1056. * valarith.c: check for zero in division and remainder evaluation. > Although there may be some systems that can healthily respond to this, I > propose a trivial patch - unless someone is going to tell me there's an > option to stop the hanging, or respond differently to the signal. Someone still has to dive into the signal handling design and fix the lower-level problem, which is analyzed in the PR. Briefly, the problem is that gdb defers the its response to the signal and returns from the signal handler, but returning from the signal handler for SIGFPE can re-execute the same instruction that hung. But I'm all for patching value_binop and providing a friendly error message for BINOP_DIV and BINOP_REM. That's the most common place a gdb user would generate a SIGFPE. Michael C