From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13705 invoked by alias); 31 Jan 2002 20:45:39 -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 13615 invoked by uid 22784); 31 Jan 2002 20:45:30 -0000 From: Michael Snyder Newsgroups: cygnus.gdb Subject: Re: "xbreak" command in GDB ? Date: Thu, 31 Jan 2002 12:45:00 -0000 Organization: Red Hat, Inc. Message-ID: <3C59AA17.4700F9DE@redhat.com> References: <4.2.0.58.20020125092058.0149ec80@ics.u-strasbg.fr> NNTP-Posting-Host: reddwarf.sfbay.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: cronkite.cygnus.com 1012509611 8816 205.180.231.12 (31 Jan 2002 20:40:11 GMT) X-Complaints-To: postmaster@cygnus.com NNTP-Posting-Date: 31 Jan 2002 20:40:11 GMT X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en To: gdb@sources.redhat.com DJ-Gateway: from newsgroup cygnus.gdb X-SW-Source: 2002-01/txt/msg00371.txt.bz2 Pierre Muller wrote: > > 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? It can't. > Or is there a compiler switch (for GCC) > that can force generation of a unique > exit location? No. > 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