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: MI: type prefixes for values


> Cc: Eli Zaretskii <eliz@gnu.org>, Vladimir Prus <ghost@cs.msu.su>,
>         gdb@sources.redhat.com
> From: Jim Ingham <jingham@apple.com>
> Date: Fri, 17 Feb 2006 12:40:52 -0800
> 
> And... since the varobj's only parse the expression once when the  
> varobj is created, getting the current values of varobj's is much  
> faster than doing -data-evaluate-expression.  Not a big deal if you  
> are just printing one value.  But if you are trying to update all the  
> local variables on every step, this can be significant.  People tend  
> to be pretty sensitive to the speed of the "step" operation...
> 
> If you're writing a front end using the MI, you are better off using  
> variable objects for anything that you are likely to refresh more  
> than one or two times.
> 
> In Xcode, we do use -data-evaluate-expression, but only when we are  
> doing function calls where we know the call we are making and what to  
> expect back.  In this case the overhead of the variable object is not  
> worth the trouble.  Other than that, we use varobj's...

Jim, how about if you (and everyone else who has working knowledge of
using MI in front ends) write a section for the GDB manual with
various do's and dont's, such as those you mention above?  I think
this would be a useful addition to the manual, one that could
significantly boost developers' readiness to switch to MI and use it
wisely.  Right now, every one of them needs to discover this on their
own.


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