From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24788 invoked by alias); 12 Sep 2002 19:06:54 -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 24776 invoked from network); 12 Sep 2002 19:06:53 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 12 Sep 2002 19:06:53 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 593F43C44; Thu, 12 Sep 2002 15:06:50 -0400 (EDT) Message-ID: <3D80E5CA.5000504@ges.redhat.com> Date: Thu, 12 Sep 2002 12:06:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc][rfa:doc][rfa;testsuite] Add ``internal-warning'' References: <3D5C1E06.4030209@ges.redhat.com> <2950-Sun18Aug2002221837+0300-eliz@is.elta.co.il> <3D5FF5F5.5080300@ges.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00206.txt.bz2 > Date: Thu, 15 Aug 2002 17:32:54 -0400 > From: Andrew Cagney > > This patch adds an internal_warning() function to GDB. It's behavour is identical to internal_error() (quit? dump core?) only, at the end, it doesn't throw an error, instead returning to the caller. > > >> I'd like gdb.texinfo to tell more about what GDB will print when this >> command is invoked. Perhaps just give an example. ``behave as though >> an internal error or warning is being reported'' doesn't sound >> descriptive enough (it's not like every user is born with a built-in >> knowledge of that behavior... ;-). > > Makes sense, I'll do both. How is this ... <<<< @kindex maint internal-error @kindex maint internal-warning @item maint internal-error @itemx maint internal-warning Cause @value{GDBN} to call the internal function @code{internal_error} or @code{internal_warning} and hence behave as though an internal error or internal warning has been detected. In addition to reporting the internal problem, these functions give the user the opportunity to either quit @value{GDBN} or create a core file of the current @value{GDBN} session. @smallexample (gdb) @kbd{maint internal-error testing, 1, 2} @dots{}/maint.c:121: internal-error: testing, 1, 2 A problem internal to GDB has been detected. Further debugging may prove unreliable. Quit this debugging session? (y or n) @kbd{n} Create a core file? (y or n) @kbd{n} (gdb) @end smallexample Takes an optional parameter that is used as the text of the error or warning message. >>>> Andrew