From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9302 invoked by alias); 25 Jan 2002 08:27:31 -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 9260 invoked from network); 25 Jan 2002 08:27:27 -0000 Received: from unknown (HELO cerbere.u-strasbg.fr) (130.79.112.7) by sources.redhat.com with SMTP; 25 Jan 2002 08:27:27 -0000 Received: from laocoon (laocoon.u-strasbg.fr [130.79.112.72]) by cerbere.u-strasbg.fr (8.9.3/8.8.7) with ESMTP id JAA11198; Fri, 25 Jan 2002 09:27:15 +0100 Message-Id: <4.2.0.58.20020125092058.0149ec80@ics.u-strasbg.fr> X-Sender: muller@ics.u-strasbg.fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Fri, 25 Jan 2002 00:27:00 -0000 To: Eli Zaretskii , k_sarnath@ctd.hcltech.com From: Pierre Muller Subject: Re: "xbreak" command in GDB ? Cc: gdb@sources.redhat.com In-Reply-To: <6137-Fri25Jan2002094510+0200-eliz@is.elta.co.il> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-SW-Source: 2002-01/txt/msg00294.txt.bz2 At 08:45 25/01/2002 , Eli Zaretskii a écrit: > > 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? > >On my system (DJGPP, GCC 3.0.2), xbreak does seem to work. Well, not the official 5.0 DJGPP release .... there the position is also after the final ret instruction. I also tested with cygwin current CVS executable and it also inserted the breaklpoint past the last instruction. Anyhow, how is this supposed to work for C code that can have multiple ret instructions in one function? Or is there a compiler switch (for GCC) that can force generation of a unique exit location? Otherwise the best solution (on systems with hardware watchpoints) would probably be to insert a breakpoint at entry and to watch stackpointer value. > > 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? Simply try ./gdb ./gdb break main xbreak main disas main Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller@ics.u-strasbg.fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99