This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: question about breakpoints


Keith Seitz wrote:
> 
> Tom Tromey wrote:
> >
> > Fernando> Sorry Tom, I missed the fact that these two are not ever
> > Fernando> printed.  In this case a new function would be in order.
> >
> > I think converting the existing function and then adding new output to
> > it is the best approach.
> >
> 
> I'm with Tom on this one. This is one of those really, really old
> functions from the original gdbtk which has survived into this "new"
> version. Its intent is to provide all the information there is about a
> breakpoint.
> 
> I believe that this function should be extended to include the
> information about the breakpoint, since this is the function's purpose.
> 

Unfortunately this will make my life more difficult afterwards.
The corresponding MI call has the contents frozen because of the CLI.
I had a function to add extra fields but I was asked to try to avoid
adding it.  So I would prefer a separate function for these fields.

Furthermore, the first set (in the current command) is user oriented info,
while the second one would be for some non-visible internal hack.
I don't think we should mix these much (MI has parameters of the "-X"
kind -- we could add one to the command if necessary, but not alter the
current result).

And I disagree with the way this is supposed to work (see below). 


> Of course, there is an argument here to be made that we should
> restructure gdbtk commands to look more like tcl commands, i.e.,
> "breakpoint set", "breakpoint enable", "breakpoint disable", "breakpoint
> info", etc. Just a thought. :-)
> 
> > Fernando> I thought you were going to save/reinsert breakpoints based
> > Fernando> on the symbolic information rather than in the addresses.
> >
> > Yes.  My understanding is that `addr_string' and `exp_string' are the
> > original strings used by the user to set the breakpoint or expression
> > (resp).  I say this because that is what the comments in breakpoint.h
> > imply.  Am I wrong?
> 
> I believe that this is correct. This is exactly what you would want. (At
> least, that is the way I remember it, too. I seem to recall that this
> bit me once or twice while trying to do something.)
> 

I haven't looked at what `addr_string' and `exp_string' are.  The names seem
to be badly chosen.

But I don't think you (or whoever adds saved breaks) should necessarily use
the same specification as the user (who would have most probably clicked on
the source window, but not necessarily).  The debugger must use some smart
algorithm to maximize the chances that the breakpoint is still meaningful.
This means using all the information available, which is already in the
current command.

This was discussed before with several engineers who were writing a GUI for
GDB and they deemed the current output as sufficient for their implementation.



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]