Re: "xbreak" command in GDB ?

Michael Snyder
2002-01-31T20:39:27Z

Eli Zaretskii wrote:
>
> > 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?

XBREAK was added by HP, in a completely non-portable way,
and the maintainers did not catch it. When I can find a
spare moment, I am going to post a patch recommending
its removal.

> On my system (DJGPP, GCC 3.0.2), xbreak does seem to work.

If you look at how XBREAK is implemented, you will see
that if it works at all it is sheer coincidence, and it
doesn't really do anything useful even then. The best it
may do is stop you at the return instruction, and by then
your stack frame will have been destroyed.

> > 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?