From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30227 invoked by alias); 2 Jun 2006 20:56:57 -0000 Received: (qmail 30217 invoked by uid 22791); 2 Jun 2006 20:56:56 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 Jun 2006 20:56:54 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-147-250.inter.net.il [80.230.147.250]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id ETU39506 (AUTH halo1); Fri, 2 Jun 2006 23:56:50 +0300 (IDT) Date: Fri, 02 Jun 2006 20:56:00 -0000 Message-Id: From: Eli Zaretskii To: gdb-patches@sourceware.org In-reply-to: <20060602135237.GA23384@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 2 Jun 2006 09:52:38 -0400) Subject: Re: patch for invalid hw breakpoints Reply-to: Eli Zaretskii References: <447EE9A8.4050800@codesourcery.com> <20060601172639.GA25709@nevyn.them.org> <447F27BC.6030808@codesourcery.com> <20060601180321.GA26791@nevyn.them.org> <20060601211159.GA557@nevyn.them.org> <20060602135237.GA23384@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00024.txt.bz2 > Date: Fri, 2 Jun 2006 09:52:38 -0400 > From: Daniel Jacobowitz > Cc: gdb-patches@sourceware.org, Nathan Sidwell > > Is this contract that you're asserting documented anywhere? Not that I know of. > Anyway, this is not a productive argument. Let's change remote.c > instead. If someone ever finishes separating into a location per > watched value, then we can arrange to only remove what we inserted > at that later time. That'd be fine with me. > > Meanwhile, I really don't like the fact that remote.c throws an > > internal error in situations that don't require that. To me, internal > > error means a situation akin to SIGSEGV: something is dead wrong, but > > the code has no means of figuring out what's that. > > If I were writing this code it would be a gdb_assert, which generates > an internal error. Those are designed for two situations: hopelessly > confused, and violated assumptions. This is the latter, not the > former. It's thrown here because here is where we can detect that it > happened. Assertions for violated assumptions reveal bugs. In this case, the bug is that the assumption was invalid.