This is the mail archive of the
mailing list for the GDB project.
Re: "xbreak" command in GDB ?
At 08:45 25/01/2002 , Eli Zaretskii a écrit:
> > From: "Sarnath K - CTD, Chennai." <firstname.lastname@example.org>
> > 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
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?
Institut Charles Sadron
F 67083 STRASBOURG CEDEX (France)
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99