[RFA] Use vector for varobj_list_children interface.

Pierre Muller muller@ics.u-strasbg.fr
Wed Jan 30 08:31:00 GMT 2008


Volodya,

  I suspect that your commit broke
gdbtk:
$ make
gcc -c -gstabs+ -O0   -I. -I../../purecvs/gdb -I../../purecvs/gdb/config
-DLOCAL
EDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../purecvs/gdb/../includ
e/opcode -I../../purecvs/gdb/../readline/.. -I../bfd
-I../../purecvs/gdb/../bfd
-I../../purecvs/gdb/../include -I../libdecnumber
-I../../purecvs/gdb/../libdecnu
mber   -DMI_OUT=1 -DGDBTK -DTUI=1  -Wall -Wdeclaration-after-statement
-Wpointer
-arith -Wformat-nonliteral -Wno-unused -Wno-switch -Wno-char-subscripts
-Werror
-I../../purecvs/gdb/../libgui/src
-I/home/Pierre/gdbcvs/purecvs/itcl/itcl/gener
ic  \
        -I/home/Pierre/gdbcvs/purecvs/tcl/generic
-I/home/Pierre/gdbcvs/purecvs/
tk/generic  -I"/home/Pierre/gdbcvs/purecvs/tk/xlib" \
                ../../purecvs/gdb/gdbtk/generic/gdbtk-varobj.c
../../purecvs/gdb/gdbtk/generic/gdbtk-varobj.c: In function
`variable_children':

../../purecvs/gdb/gdbtk/generic/gdbtk-varobj.c:422: error: too many
arguments to
 function `varobj_list_children'
make: *** [gdbtk-varobj.o] Error 1


Could you please fix that?

Pierre Muller

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Vladimir Prus
> Sent: Wednesday, January 30, 2008 8:20 AM
> To: gdb-patches@sources.redhat.com
> Subject: Re: [RFA] Use vector for varobj_list_children interface.
> 
> On Wednesday 30 January 2008 00:52:40 Daniel Jacobowitz wrote:
> > On Thu, Jan 17, 2008 at 05:55:47PM +0300, Vladimir Prus wrote:
> > > +  for (ix = 0; VEC_iterate (varobj_p, children, ix, child); ++ix)
> > >      {
> > >        struct cleanup *cleanup_child;
> > >        cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout,
> "child");
> > > -      print_varobj (*cc, print_values, 1 /* print expression */);
> > > -      cc++;
> > > +      print_varobj (child, print_values, 1 /* print expression
> */);
> > >        do_cleanups (cleanup_child);
> > >      }
> > >    do_cleanups (cleanup_children);
> > > -  xfree (childlist);
> > >    return MI_CMD_DONE;
> > >  }
> >
> > Not freeing children here is on purpose, right?  It's now the copy
> > from inside the varobj.
> 
> Right. I've added a comment to varobj_list_children to make
> this more clear.
> 
> >
> > > -int
> > > -varobj_list_children (struct varobj *var, struct varobj
> ***childlist)
> > > +VEC(varobj_p)*
> >
> > Space there :-)
> 
> Strictly speaking, I think that gcc does not use space after VEC. But
> I have better things to do that arguing about this ;-)
> 
> > Otherwise OK, thanks.
> 
> Thanks. I've also noticed I did not update dependencies for varobj_h,
> now that it includes vec.h. I've added that, and checked in.
> 
> - Volodya





More information about the Gdb-patches mailing list