Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: "xbreak" command in GDB ?
Date: Thu, 31 Jan 2002 12:45:00 -0000	[thread overview]
Message-ID: <3C59AA17.4700F9DE@redhat.com> (raw)
In-Reply-To: <4.2.0.58.20020125092058.0149ec80@ics.u-strasbg.fr>

Pierre Muller wrote:
> 
> At 08:45 25/01/2002 , Eli Zaretskii a écrit:
> > > From: "Sarnath K - CTD, Chennai." <k_sarnath@ctd.hcltech.com>
> > > 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


  reply	other threads:[~2002-01-31 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-24  1:33 Sarnath K - CTD, Chennai.
2002-01-24 23:46 ` Eli Zaretskii
2002-01-25  0:27   ` Pierre Muller
2002-01-31 12:45     ` Michael Snyder [this message]
2002-01-31 12:39   ` Michael Snyder
2002-01-31 12:43 ` Michael Snyder
2002-01-25  0:24 Sarnath K - CTD, Chennai.
2002-01-25  0:33 Sarnath K - CTD, Chennai.
     [not found] <EF836A380096D511AD9000B0D021B52754B482@narmada.ctd.hcltech .com>
2002-01-25  1:20 ` Pierre Muller
2002-01-28 11:18   ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C59AA17.4700F9DE@redhat.com \
    --to=msnyder@redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox