This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -var-list --locals proposal


 > So, you either have frame_id->list_of_varobjs mapping in gdb, or in
 > the frontend. I'm not sure which one is better. If this kept in a frontend,
 > you'd also need notification "frame id XXX has died" so that
 > the frontend can clean up its mapping.

I think there should varobjs that are created from locals which get deleted
when leaving the frame, and ordinary varobjs (which I guess could get deleted
if they aren't globals).  Normally the user won't create two watch expressions
for the same variable but I think that should be his business.  I think it
would be hard to avoid duplication as one watch expression might be a child
object.

 > We'd need similar thing for function arguments, perhaps -- command like
 > 
 > 	-var-list --arguments

In Insight arguments are listed alongside locals.  It might be a good idea to
have:

  -var-list --args-and-locals

and perhaps a field to say which is which.  It seems sensible to list them
all in one window.

 > that would try hard to reuse varobjs and which command can be used
 > to implement stack display. I'd much prefer to have this logic in gdb,
 > because doing it in the frontend is not anyway simpler, I think.



-- 
Nick                                           http://www.inet.net.nz/~nickrob


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