From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: Eli Zaretskii <eliz@is.elta.co.il>, k_sarnath@ctd.hcltech.com
Cc: gdb@sources.redhat.com
Subject: Re: "xbreak" command in GDB ?
Date: Fri, 25 Jan 2002 00:27:00 -0000 [thread overview]
Message-ID: <4.2.0.58.20020125092058.0149ec80@ics.u-strasbg.fr> (raw)
In-Reply-To: <6137-Fri25Jan2002094510+0200-eliz@is.elta.co.il>
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?
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
next prev parent reply other threads:[~2002-01-25 8:27 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 [this message]
2002-01-31 12:45 ` Michael Snyder
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=4.2.0.58.20020125092058.0149ec80@ics.u-strasbg.fr \
--to=muller@cerbere.u-strasbg.fr \
--cc=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
--cc=k_sarnath@ctd.hcltech.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