From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10527 invoked by alias); 31 Jan 2002 20:39:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10481 invoked from network); 31 Jan 2002 20:39:25 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 31 Jan 2002 20:39:25 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA19131; Thu, 31 Jan 2002 12:39:02 -0800 (PST) Message-ID: <3C59A9CC.5B4392E1@redhat.com> Date: Thu, 31 Jan 2002 12:39:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Eli Zaretskii CC: k_sarnath@ctd.hcltech.com, gdb@sources.redhat.com Subject: Re: "xbreak" command in GDB ? References: <6137-Fri25Jan2002094510+0200-eliz@is.elta.co.il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00369.txt.bz2 Eli Zaretskii wrote: > > > From: "Sarnath K - CTD, Chennai." > > Date: Thu, 24 Jan 2002 14:59:18 +0530 > > > > The "xbreak" command (and hence "txbreak" ) > > in GDB Version 5.1 doesnt seem to work > > properly. > > What OS? What compiler? XBREAK was added by HP, in a completely non-portable way, and the maintainers did not catch it. When I can find a spare moment, I am going to post a patch recommending its removal. > On my system (DJGPP, GCC 3.0.2), xbreak does seem to work. If you look at how XBREAK is implemented, you will see that if it works at all it is sheer coincidence, and it doesn't really do anything useful even then. The best it may do is stop you at the return instruction, and by then your stack frame will have been destroyed. > > A minute investigation showed that it is > > setting a break-point at a posn > > 1 past the last instrn of the "function". > > Could you send a complete short test program and a sequence of > commands, including the compilation command line, to reproduce that?