This is the mail archive of the gdb-patches@sources.redhat.com 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: Patch for gdb/mi problem 672


Keith Seitz writes:
 > Hi,
 > 
 > Although I know that varobj shouldn't longjmp in case of errors, I don't 
 > think that this is going to be a safe assumption. I would recommend that 
 > you refrain from using ui_out_*_begin and ui_out_*_end, and instead use 
 > make_cleanup_ui_out_*_begin_end and do_cleanups, which will make sure that 
 > the UIOUT builder is properly reset in case of errors. (See, for example, 
 > the cleanup that I did in mi_cmd_data_list_registers.)

Yes, right. I keep forgetting about this myself.

Jeff, the cleanups are done in case of error (i.e. longjump) out of
this function. If not, the nesting and depth of the lists would be
messed up for the next command that uses them.

Other than such change, approved.
When you commit, repost the patch that actually went in.

For the testsuite: mi0 is no more. These modified tests should go in
as mi2-var-child.exp, etc, leaving the mi-var... unchanged. Is this
the intent? Andrew?

thanks
Elena


 > 
 > On Fri, 27 Sep 2002, J. Johnston wrote:
 > 
 > > @@ -419,10 +419,10 @@
 > >    if ((*name == '*') && (*(name + 1) == '\0'))
 > >      {
 > >        nv = varobj_list (&rootlist);
 > > -      ui_out_tuple_begin (uiout, "changelist");
 > > +      ui_out_list_begin (uiout, "changelist");
 > >        if (nv <= 0)
 > >  	{
 > > -	  ui_out_tuple_end (uiout);
 > > +	  ui_out_list_end (uiout);
 > >  	  return MI_CMD_DONE;
 > >  	}
 > >        cr = rootlist;
 > 
 > [Andrew has already addressed the MI0 thing...]
 > 
 > Other than that, I would recommend that it be approved (for whatever 
 > that's worth).
 > 
 > Keith
 > 


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